iphone

tab views on iPad not resizing

My view doesn't stretch to fit the current orientation! I am creating a tab bar application. I replicated the sample one that you create when you "create a new tab bar application". Everything works except when I change the orientation of the iPad it rotates the view, the tab bar stretches out on the bottom, but the view doesn't resize....

How to select range of values when using arc4random()

Can I set a range of numbers when using arc4random()? For example 50-100 only. ...

Can videos be played without controls?

I'm planning on making a game for the iPhone and want to have the background constantly animated. I figured rather than looping a series of images, I'd play a video. Is it possible for me to play a video (with no controls popping up), and have graphics overtop of it (the actual game)? Or would I just be better off with looping images? (...

Dragging a touch along a row of UIButtons

I have a row of say 10 UIButtons along the bottom of the iPhone screen. The user can TouchUpInside each of these. I'd also like to allow the user to drag their finger along the row, deselecting the previous button that was touched when the finger is over the next. This kind of behaviour is seen on iPhone's keyboard. The obvious thing to...

Debugging an iOS app with an external accessory connected via Dock

Am I missing something glaringly obvious or is there no way to debug an iOS app which uses an external accessory that's connected via the 30-pin dock without using a bucket load of logs etc. I want to be able to use things such as breakpoints and Instruments. Is there a way to remote debug perhaps, over Wi-Fi, Bluetooth? Note: Yes, I ...

Creating and Destroying Objects for passing between Views

Overview of app My RVC has an object of custom type 'Entry' that has various values (AssetURL, Notes for item). I pass an instance of this to two viewControllers in order to add information about the Entry into this instance for saving. I do this successfully, but am unsure about how I should be creating / destroying my objects. If I ...

How to achieve this animatied transition effect when selection changes?

(The title sucks. How to improve?) In the picture above, there are 5 items. Use gestures to change selected item. During selection changing, there is some kind of animation like the Dock of MacOSX(although not that fancy). After that, the selected item will be in the screen center and in a highlighted mode(like cycling through a serie...

UIViewController not responding to presentModalViewController for modal navigation

I am trying to implement a modal navigation controller as described in the Apple iOs Guide http://tinyurl.com/2fswaul I have come to the conclusion that I am missing something both obvious and stupid as I simply cannot get anything to display, I get a blank white screen. Swapping things out I can prove that the view controller that I a...

Back Navigation Button Not Showing up in Pushed View Controller

I have a problem where I can successfully push a new view controller from my root view controller (using the Navigation-based application using Core Data template), but the detail view, which is a separate xib file from the root view controller, doesn't display the back navigation button. I'm certain that I've done all of the proper conn...

NSPredicate filter the data via relationship rather than a property

Here is my question. I have this model one [Event] has multiple [Day] and there is a relationship called days in [Event] and there is a reverse relationship event in [Day]. Now I want pass the Event object and get all days using NSFetchedResultsController and feed all days in the table. Here is my code: // Create the fetch request for ...

iOS 4 app flickers and crashes when returning from background mode

I just converted an iPhone OS 3 app to iOS 4, and once in a while, the screen will flicker and then turn black when the app returns from background mode. Has anyone else experienced this? I finally resorted to terminating the app before it enters background mode. This is definitely a temporary band aid: - (void)applicationDidEnterBackg...

How can I convert longbits to double in objective-C?

In java I can use Double.longBitsToDouble() static function but in objective-C I can't find a way to do like that. How can I get that? Thanks :) ...

iPhone: Reload view after switch back from foreground/background?

This is for iOS4 with multitask issue. How do I reload view after my app is re-appear from background running app? ...

array of integer

please tell me that can we create an array of imteger in objective c i am a new iphone programmer and i am creating an aray which can take an integer from a view (at 0th position)and pass that array to next view and then again put an integer to it (at 1st position) and so on.... please help because it does not accept integer value ...

How do you handle song changes when your application is running in the background?

In my case, I had previously set the session to inactive between song changes before starting a new song: AudioSessionSetActive(false); Once I removed this AudioQueueStart works just fine from the background. Please let me know more about AudioQueueStart, is there any method instead of AudioQueueStart? ...

How to draw route between two locations in iPhone?

How can we draw the routes between two locations in MapView using the iOS 4.0? Can some one shed light on it? ...

NSURLConnection delegate methods not executing

I'm running the following example code from Apple - NSString *requestURL = [[NSString alloc] initWithString:@"http://google.com/"]; NSURLRequest *theRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:requestURL] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; NSURLConnectio...

background image for section in UitableView

How can i set png image with transparency for background of section's header in UiTableView? ...

How do you use AVAudioPlayer to play music while in the background?

I currently use AVAudioPlayer to play music while in the foreground, but when I press the home button my application goes to the background and the music stops. I set the category for my AVAudioSession to AVAudioSessionCategoryPlayback and set active to YES. Additionally, I added the audio key to UIBackgroundModes in my Info.plist. Is...

IPhone Development - Chart From Google API

Hi all, I'm trying to use the Google API to put some graphics in my application but it's not workig. I tested the code for other images on internet and it worked. Code: - (void)viewDidLoad { [super viewDidLoad]; UIImage *myimage = [UIImage imageWithData: [NSData dataWithContentsOfURL: [NSURL URLWithString: @"http://chart....