Quote:
|
1. What exactly is the full form of XIB and NIB? Where do I find the NIB file? I can find the XIB files but can't locate the NIB files
|
You will be able to find your .xibs in the resources folder in XCode. The .nibs are created at build-time so you will not be able to find them in your project. Just edit your .xib and your .nib will follow through accordingly.
Quote:
|
2. If I were to create a multi-screen iPhone application, for instance something like the phone book application would a view based application template enable me to do that? Or should I use a window based application template?
|
To create a multi-screen iPhone application, I would use a navigation template but just strip it down. To strip it down, you can do the following:
1) Open up RootViewController.xib.
2) Delete TableView.
3) In your Library, find View and double click it to add it in.
4) Right click on File's Owner (this is the link to your viewController with methods and outlets) and drag View to your View that you added before. You should see a blue line that stretches, drag this blue line over to the view that you added to connect it. You should then see (View - View) when you do it correctly.
5) Press Apple-S and Apple-Q to save and quit Interface Builder.
6) Go to RootViewController.h and change TableViewController to ViewController (it is in the top by the @ line).
7) Open RootViewController.m and delete everything past @implimentation RootViewController; and do not delete the following:
Code:
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Relinquish ownership any cached data, images, etc that aren't in use.
}
- (void)viewDidUnload {
// Relinquish ownership of anything that can be recreated in viewDidLoad or on demand.
// For example: self.myOutlet = nil;
}
- (void)dealloc {
[super dealloc];
}
@end
8) Now, you should be good to go. If you want to hide the navigation bar, you can do the following:
9 a) Open up YourAppDelegate.m.
b) Go to ApplicationDidFinishLaunching and add the following line:
Code:
[self.navigationController setNavigationBarHidden:YES];
So, with the following above, you can create a view application with a navigation controller built in, very easily. From here, you can push view controllers by adding just 3 lines of code.