我想知道我的程序是否正确。你可以帮我吗?obj-c编程是否正确
@interface ViewController : UIViewController
{
UILabel *messageLabel;
}
@end
当我在.h中声明新对象并在.m中创建时,我必须使用@property (nonatomic, retain) UILabel *messageLabel
?我看到几个列表,当代码@property
创建对象不存在,很少有存在的地方,我很困惑。
当我不使用@property(例如UILabel
,UIImageView
,UIButton
)当我通过代码创建对象时它是否正确?
如果您打算使用这些对象中的信息在视图之间传递,则只需要@property。 – 2012-01-02 12:39:24