iphone

iPhone SDK: Using the NavigationController, how to invoke another view?

I am using a NavigationController and I want to be able to put another view on the stack in relation to some event. I am not sure what the call is. Thanks in advance. ...

How to draw an UIImage or directly in -drawRect:?

I have an UIImage which I want to draw on a UIView. But instead of creating an UIImageView and adding this as an subview, I want to overwrite -drawRect: and draw my UIView directly. For example, my code looks like: - (void)drawRect:(CGRect)rect { CGContextRef myContext = UIGraphicsGetCurrentContext(); UIImage *img = [UIImage i...

UINavigationController viewController intra communication.

Whats the best way for UIViewControllers that are pushed onto a UINavigationController to communicate with each other? Method chaining back up to the root most parent view controller? Connecting references to other view controllers w/ IB? ...

UITableView Indexing problem

I have an indexed table view that organizes cities in a state by their first letter. What I have working is an NSMutableDictionary is created with the keys of A,B,C,etc. and the corresponding cities are added to their respective arrays. ex: Y = ( Yatesboro, Yeagertown, York, "York Haven", "York New Salem", "Y...

Can't understand iPhone view layout

I have an iphone app that I built based off a tutorial (for a different framework so I had to modify things a bit) that uses a TabBar and a NavigationBar on the same View that also contains a UITable populated from an SQLite db. I built it last night and when you select an item in the UITable it was redirecting to a view that displayed t...

Best way to check if an iPhone app is running for the first time

I want to check if my iPhone app is running for the first time. I can create a file in the documents folder and check that file to see if this is the first time the app is running, but I wanted to know if there is a better way to do this. ...

iPhone SDK: How to display a view controller within another?

Fundamentally, what I want to do is within, for example, ViewControllerA display ViewControllerB and ViewControllerC. How would I do that? Thanks in advance. ...

Xcode SVN Error: Attempted to lock an already-locked dir, How to solve?

Error: 155004 (Attempted to lock an already-locked dir) Description: Working copy '/Users/Carrie/MyProjects/Sandbox/Flip/Classes' locked ...

UITextField ellipses

I have a UITextField but when it overflows I want it to scroll not use an ellipses. Can you do this on the iPhone? ...

iPhone signature capture

My company would dearly like to have an iPhone app which, among other functions, could capture a customer signature. A web app would be ideal but unfortunately, Mobile Safari doesn't appear to allow mouse movements to be captured by javascript. It traps them for screen manipulation. So my question is in two parts: Is there any way a...

How to remove bottom bar from NavigationView/TableView

I have an app that has a TableView, NavigationView and TabBar running together. There is a bar along the bottom of the screen above the TabBar that looks exactly like the NavigationBar at the top of the screen. I have no idea what it is or how to get rid of it. Here is what it looks like with what I want gone crossed out: This is the ...

Battery Level Will Not Update

Hello there, I am having a small problem. I am a beginner to iPhone programming so please forgive me if the answer is obvious. I have found the current charge and want it to continually update while my app is running. I tried this: - (void) viewWillAppear:(BOOL)animated { NSLog(@"viewWillAppear"); double level = [self batteryLevel]...

Objective C double Delegate protocol

Hi, I get the following error when compiling my app. warning: class 'ConfigureViewController' does not implement the 'MPMediaPickerControllerDelegate' protocol I know that it means I have to implement the delegate in the Controller. i.e @interface ConfigureViewController : UIViewController < MPMediaPickerControllerDelegate > However, ...

UINavigationItem.prompt appearing, moves the view below. How to listen for a new prompt?

I have a normal UINavigationController with a UIViewController contained in it, when my view controller has a prompt applied to it (via a UINavigationItem.prompt = @"some prompt"), the prompt is animating the UIViewController's view downward. My question is, is there an apple what to find out that a prompt will appear (and maybe the an...

Objective C speeding up animation / object creation

Hi, What kind of trick can I use to speed up and improve an image sequence animation? I'm using the code below, but then just running through the codes below takes a couple of seconds to finish. Once the animations have been created, my phone seems to get much slower too. Please enlight. Thanks, Tee NSMutableArray * sequenceArr...

How to play a song from the itunes library in iphone

Hi i need to play a song from the itunes library. I had gone through the Apples ipod Library Access Guide and got the code. MPMediaQuery *everything = [[MPMediaQuery alloc] init]; NSLog(@"Logging items from a generic query..."); NSArray *itemsFromGenericQuery = [everything items]; MPMediaItem *song; for (song in itemsFromGenericQuer...

MPMoviePlayerController & .m3u8 playlist

Hello, I would like to use a .m3u8 playlist containing remote mp4 files with MPMoviePlayerController, did you success with this ? Does the .m3u8 must contain .ts file ?If not what is the purpose of .ts ? Does next / previous buttons will be enable once the playlist be loaded ? If not, what is the purpose of these buttons ? And last qu...

UITextView hasText not working?

I am assigning the contents of the clipboard to the UITextView text property. However, when I check the hasText property, the condition is always false. NSString paste_text = [[NSString alloc] init]; self.paste_text = [UIPasteboard generalPasteboard].string; .... my_UITextView.text = self.paste_text; //THIS CONDITION IS ALWAYS FAL...

How to display a map by mapkit framework in iphone using URL like http://maps.google.com....[it opens map as new App]

When we open : http://maps.google.com & type : category:"motel"+California+USA we get the California region map with the motels in that region. This is done by using MapsApp in iphone. But it closes the current application & opens the map as New App. Now is it possible to do the same thing with mapkit framework? How to use URL in Mapk...

Built in Analyzer in Xcode 3.1.4

Hi all, I wonder if the built in Analyzer in Xcode 3.1.4 makes it redundant to use LLVM/Clang Static Analyzer separately? Please refer to the original article here: Finding memory leaks with the LLVM/Clang Static Analyzer Thanks. ...