view-controller

How to access the parent view controller?

I am using this code to push a view controller in ViewControllerA: DatePickerViewController *viewController = [[DatePickerViewController alloc] initWithNibName:@"DatePickerViewController" bundle:nil]; NSMutableArray *info = [[NSMutableArray alloc] initWithObjects:@"Exam Duration",nil]; [viewController setInfo:info]; [info release]; [sel...

Pass string from tableviewcontroller to viewcontroller in navigation stack

How should I pass a string to the view controller that gets pushed when a tableviewcell is selected. Should I create a custom init method in the view controller? eg [[myvc alloc]initWithURL:...] Set a property? eg [myvc setURL:...] or myvc.url = ... or just create a custom method? [myvc setLoadingURL:...] ...

Regarding iPhone orientation and firmware: Always force orientation.

Lately, I have received a text from the QA folks saying that the developed app's orientation is incorrect on iPhone 3, while it can display correctly on iOS 4. They say on iOS 3, the app's orientation is on portrait view, which makes the app leaving gray space below. However, they claimed that on iOS 4, the orientation is correct. I te...