Posts Tagged ‘iphone’

iPhone/iPad navigation controller

Friday, November 12th, 2010

Have you ever tried to add a navigation controller without starting up a project based on that controller?
Well you can’t have such project on iPad as well.
So after some Google you find something like this solution:
http://johnnytrops.com/blog/wp/?p=224

Another way is to drag the Navigation Controller in Interface Builder to the XIB, specify it’s RootViewController class, and assign an IBOutlet property in the File’s Owner (can be app delegate or another ViewController).

EmailShare

iPhone alert with prompt (textfield)

Friday, November 12th, 2010

A lot of examples about alert with textfield show, that you can add the textfield element with the [alert addTextFieldWithValue: label:"] method. However (as it is stated in the articles), this method is private, and Apple rejects in when passing to app store. (maybe the method is removed from UIAlertView in the latest SDK)
Here is the right way with addSubview, including a little helper class as well:
http://iphonedevelopment.blogspot.com/2009/02/alert-view-with-prompt.html

I have also included the helper class here:
AlertPrompt

EmailShare