我知道我的问题很愚蠢,但我需要知道这是为了我的进一步发展。我编程开发我iPhone application
不使用任何xib and storyboard
,对于我已宣布多个object variables
像下面如何为良好的代码结构目标声明对象变量C
UINavigationController *navigationController;
UIActivityIndicatorView *activityIndicator;
UIImageView *splashImage;
NSTimer *checkJSONtimer;
UILocalNotification *localNotification;
NSUserDefaults * defaults;
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) Login *loginView;
@end
以上代码到.h file
我宣布,现在的问题是一些UIObjects declared
无@property
和一些variable
我们的也用properties
和attributes
声明。其中Objects UI and NS
,以上两种方法如何声明。
哪一个是programming
和良好的太有道?
哦,不。那真的很糟糕。它实际上是否构建时没有重复的符号链接器错误? – trojanfoe
您意识到每次包含头文件时都会创建全局变量? – Macmade
对不起,我不能帮你。给我一个很好的解释代码,它更好地了解新的开发人员@ trojanfoe – AnswerMe