相关疑难解决方法(0)

我们在xcode 4.4.1中合成了哪些属性

我正在使用Xcode 4.4.1.当我在.m文件中定义 @property like UINavigationControllerNSArrayin .h文件时,我必须@synthesize在.m文件中.但有些人@property喜欢UITabBarController或者NSString我没有这样做才能@synthesize让它发挥作用.

我的问题是@property需要@synthesize什么,什么不需要.

AppDelegate.h

@interface AppDelegate : UIResponder <UIApplicationDelegate>
{
UITabBarController *_tabBar;
UINavigationController *_navBar;
}

@property (strong, nonatomic) UIWindow *window;
@property (nonatomic, retain) Employee *empView;
@property (nonatomic, retain) UITabBarController *_tabBar;
@property (nonatomic, retain) UINavigationController *_navBar;
Run Code Online (Sandbox Code Playgroud)

AppDelegate.m

@implementation AppDelegate
@synthesize _navBar;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after …
Run Code Online (Sandbox Code Playgroud)

ios xcode4.4

1
推荐指数
1
解决办法
3239
查看次数

标签 统计

ios ×1

xcode4.4 ×1