uiviewcontroller

UITabBarController, MoreNavigationController and the Holy Grail of Device Rotation

UPDATE: See my answer to this question first. This appears to be a bug. A minimal test case has been created and a report has been filed with Apple. (Fixed as of iPhone OS 3.1.) Greetings! Here's a puzzler from the "I'm so close!" department. I have a Tab Bar-based iPhone app. Each tab features a UINavigationController with the usual s...

Adding NavigationControl to a TabBar Application containing UITableViews

Hi, I'm new to iPhone dev and wanted to get advice on the general design pattern / guide for putting a certain kind of app together. I'm trying to build a TabBar type application. One of the tabs needs to display a TableView and selecting a cell from within the table view will do something else - maybe show another table view or a web ...

How to change UIViewControllers like iphone Calculator app does?

Hello, in my app when the phone rotates i want to change the view like the Calculator app does, when it is in portrait it shows the normal calc and when it is in landscape it shows the scientific calc. For example in one of my UIViewControllers, for portrait mode, i will have a grid with images and when it is in landscape i want it to sh...

IPhone - After dismissing Modal View Controller - gap is left at top of page

When starting the app, if the user doesn't have login information stored, I want to display a modal view controller to force the entry of this information. I found through trial and error, that this had to occur in viewDidAppear of my root view controller. I tried to put it in viewDidLoad and viewWillAppear, but those didn't work unles...

iPhone Dev - Lazy loading a Tab Bar app

How can I make it so when a tab is selected, the current one is unloaded, and the next one is loaded so only one loaded at a time? Or should I not even do this? I know how to do it with a normal UIViewController as the root VC, but not sure with a UITabBarController. Also, is there a way to animate the transition from one tab to the next...

Managing subviews in Cocoa Touch

Hi, I'm developing an iPhone app. I need to create a Quiz application that has different Question views embedded in it (see my similar question). Different types of Question will have different behavior, so I plan to create a controller class for each type of Question. The MultipleChoiceQuestionController would set up a question and 3-...

iPhone Dev - Autorotating all views

(By the way I develop without Interface Builder) If you have a tab bar app that autorotates, so all the autoresizing masks are set, how do you make it work with all the views? Like if one view autorotates to landscape, you select a different tab in the tab bar, and the view associated with that tab comes up, and its all messed because it...

How does a UIView know about an added subview's UIViewController?

in the case of say - (void)applicationDidFinishLaunching:(UIApplication *)application { ... [window addSubview:gameController.view]; ... } how does the view of gameController retain association to gameController? I've peaked through all of the Debugger variables and I see no association other than a boolean flag that it belongs to...

How does Interface Builder know about UIViewController's view?

UIViewController has an ivar (and @property) called view. It is not however, an IBOutlet. When creating a view nib in Interface Builder, you typically set File's Owner to be your UIViewController (or subclass thereof), and you wire the nib's view to File's Owner's view outlet. How does this work if the UIViewController view member isn'...

How do I pass a number / integer between view controllers?

I am having difficulty with numbers when programming my iphone app. I want to pass a number (and possibly eventually an array) from one view controller to another. I have managed to do this will strings but I just can't figure it out with numbers. This is what I have.. PrimaryViewController.h @interface PrimaryTimerViewController ...

When is UIViewController viewDidUnload called?

When does UIViewController's viewDidUnload automatically get called? Yes I know, when the view unloads. But when does that happen automatically? How can I do it manually? Thanks. ...

iPhone dev - cache values of tab bar view controllers

I have a root UIViewController subclass that has a UITabBar, (I'm not using UITabBarController) and 5 tab bar items for 5 view controllers. Each view controller has a UIPickerView. Only one view controller is ever instantiated at a time -- when a tab bar item is selected, the current one is removed, the new one is instantiated and added,...

Reading and Updating application settings from NSUserDefaults using Flipside View Controller.

Does any one have a good sample to read and update application settings from NSUserDefaults using a flipside view controller. I'd like to read and edit 4 fields stored in textbox, pickerview and a slider control. Any sample code would be helpful. ...

Can I use an EAGLView in my UIViewController?

I have a UIViewController that instantiates several UIImageViews on the screen. Is it possible to instantiate an EAGLView (like the one in the OpenGL ES template in the iPhone SDK) in a similar manner in my View Controller, and possibly have the UIImageViews as well as an EAGLView all running simultaneously on the same screen? ...

iPhone dev - In didReceiveMemoryWarning or every time

In a multi-view application, do you think its better to let views automatically get unloaded in memory tight situations, or to actually only ever have one View Controller allocated at a time, and when you switch views, the new one is created, the old one removed, the new one adde d and the old one released. Deallocating every time also m...

removing UIViewController after a push is crashing my app

Hello, I have a UIViewController which I push on my appDelegate.navigationController using : [appDelegate.navigationController pushViewController:initialLoadingController animated:YES]; This controller is getting data from network and displays a splash screen during this task. When the task is complete I push a new controller which is ...

iPhone dev - UIViewController title, tabBarItem, tag

I have a UITabBarController that manages 5 View Controllers. I create their tab bar items in their "init" methods so that they will be displayed before the view is loaded. I'm just wondering what way I should do it, because there seems to be so many ways. For example, for my DatePickerViewController: - (id)init { if((self = [super i...

How do view controllers work in the iPhone SDK?

I have just started developing iPhone applications and I am very confused by how the "view controller" aspect of the user interface works. I did the "Your First iPhone Application" tutorial on the Dev Center. It has you set up your own view controller class and then initialize it using initWithNibName. So it seems that nib files contain...

Opening UINavigationController UITable from a simple UIView

Hey all, This problem has been driving me nuts all day and there has to be a simple answer. I need to create a login page that then provides access to a UITableView which will then be controlled by a UINavigationController. The question is how do I get and initially loaded login page (UIViewController - as created by the "View-base...

Flipping views flipping me out!

This should be simple and I am half way there but still having problems. I have 2 xib files which a button in each switches views - all working fine. I want to add some animation. In the first view controller I have the following code which is also working fine... SecondTimerViewController *TimerView = [[SecondTimerViewController alloc]...