If I write directly something like this in implementation file:
UINavigationBar *navBar = [[UINavigationBar alloc] init];
In this case I haven’t set any property to my navBar, what will be its property/properties/nothing.
EDIT
-(IBAction) loginButtonPressed:(UIButton *)sender
{
UITabBarController *tabBar = [[UITabBarController alloc] init];
FirstScreen *f = [[FirstScreen alloc] initWithNibName:@"FirstScreen" bundle:nil];
UINavigationController *nav1 = [[UINavigationController alloc] initWithRootViewController:f];
nav1.title = @"FirstScreen";
SecondScreen *s = [[SecondScreen alloc] initWithNibName:@"SecondScreen" bundle:nil];
UINavigationController *nav2 = [[UINavigationController alloc] initWithRootViewController:s];
nav2.title = @"SecondScreen";
ThirdScreen *t = [[ThirdScreen alloc] initWithNibName:@"ThirdScreen" bundle:nil];
UINavigationController *nav3 = [[UINavigationController alloc] initWithRootViewController:t];
nav3.title = @"ThirdScreen";
NSArray *navControllers = [NSArray arrayWithObjects:f, s, t, nil];
tabBar.viewControllers = navControllers;
}
The properties of an object default to
nil, or0. But it is possible that these values have been changed in theinitmethod.For more information, you can always consult the documentation:
Edit
To answer your edited question,
tabBar,nav2, … are local variables and not properties.If you want them to be properties, you have first to declare such properties then, you have to access using
self.tabBar, …In the
.hfile:And in the
.mfile: