|Jun 15, 2008, 01:51 PM||#1|
Setting the view controllerís nib file name in Interface Builder
Reading through the apple documentation, I came across this paragraph:
Full document here: http://developer.apple.com/iphone/li...007457-CH5-SW1
|Jun 15, 2008, 02:33 PM||#3|
Another question you (or anyone else) may be able to help with. The MainWindow.xib that is provided - should that be left blank and should I create my main view in another nib, say MainView.xib or should I just create the view in MainWindow.xib?
I ask because it doesn't make sense to me how the MainWindow.xib view would be correctly handled - surely it needs a view controller, but I wouldn't be able to make the view controller it's file's owner. Would this mean I would have to load the view using initWithNib? (that method may not be accurate)
|Jun 15, 2008, 02:50 PM||#4|
You should just stick the main view in the first .xib
With regards to having lots of multiple files there used to be two reasons for having multiple .nib files for everything.
1) Its easier to localise if you are using version control software. But with the new .xib format that is no longer a big issue. I suppose its a slight issue still as the translators don't know what has changed as clearly, but it shouldn't matter too much.
2) There might be slightly worse performance, to put this in perspective on the Mac I have nibs with 20 windows and that part of loading takes around 1/1000th of a second. On the iPhone this may be more of an issue, but you should be OK with having a small number of views in the same nib without issue, you'll have to performance check this yourself .
Actually it does make sense. Man created god, so if we exist, He exists. - obeygiant
|Jun 16, 2008, 01:18 PM||#5|
Last question (hopefully) - I have an interface consisting of a UIView, UITableView and a UIButton.
The file's owner is set to a UIViewController which has an IBOutlet for the UIButton and UIView. It also has an IBAction method to handle the UIButton press.
I have a UITableViewController for the UITableView datasource/delegate methods.
What I want to do is refresh the UITableView when the UIButton is pressed, but what I can't work out is how to let the UIViewController know about the UITableViewController so it can refresh the UITableView. Do I just add the UITableView as an IBOutlet in the UIViewController and hook it up in IB?
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Pashua gui tool interface elements anything similar in xcode interface builder||wild4life2013||Mac Programming||1||Aug 10, 2013 08:13 PM|
|OpenGL ES without interface builder?||blueshogun96||iPhone/iPad Programming||1||Feb 10, 2013 01:04 PM|
|About push view controller into a navigation controller stack.||cthesky||iPhone/iPad Programming||5||Nov 9, 2012 08:36 AM|
|Segue from Normal View controller to navigation controller||daproject85||iPhone/iPad Programming||0||Sep 29, 2012 03:26 PM|
|push to a specific view controller regardless of which controller is active||johnmerlino||iPhone/iPad Programming||2||Jun 19, 2012 02:24 PM|
All times are GMT -5. The time now is 01:14 PM.