Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat properties do we synthesize in xcode 4.4.1
    primarykey
    data
    text
    <p>I am using Xcode 4.4.1. When I define <code>@property</code> like <code>UINavigationController</code> or <code>NSArray</code>in .h file I have to <code>@synthesize</code> it in .m file. But some <code>@property</code> like <code>UITabBarController</code> or <code>NSString</code> I don't have to <code>@synthesize</code> it to make it work.</p> <p>My Question is what <code>@property</code>s need to <code>@synthesize</code> and what need not to.</p> <p>AppDelegate.h</p> <pre><code>@interface AppDelegate : UIResponder &lt;UIApplicationDelegate&gt; { UITabBarController *_tabBar; UINavigationController *_navBar; } @property (strong, nonatomic) UIWindow *window; @property (nonatomic, retain) Employee *empView; @property (nonatomic, retain) UITabBarController *_tabBar; @property (nonatomic, retain) UINavigationController *_navBar; </code></pre> <p>AppDelegate.m</p> <pre><code>@implementation AppDelegate @synthesize _navBar; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. Employee *emp = [[Employee alloc]initWithNibName:@"Employee" bundle:nil]; self._tabBar = [[UITabBarController alloc]init]; self._navBar = [[UINavigationController alloc]initWithRootViewController:emp]; self._tabBar.viewControllers = [NSArray arrayWithObjects:_navBar, nil]; self.window.rootViewController = self._tabBar; self._navBar.navigationBar.tintColor = [UIColor brownColor]; self.window.backgroundColor = [UIColor whiteColor]; [self.window makeKeyAndVisible]; return YES; } </code></pre> <p>When I <code>@synthesize</code> <code>UINavigationController</code> I get <code>UINavigationController</code> and <code>UITabBarController</code>. But when I don't <code>@synthesize</code> <code>UINavigationController</code> I don't get <code>UINavigationController</code> but <code>UITabBarController</code> is displayed. </p> <p>In both cases I didn't <code>@synthesize</code> <code>UITabBarController</code></p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload