iOS中的属性未设置

时间:2012-09-20 17:27:24

标签: objective-c ios ivar

我有以下代码。 self.settingsObject总是零?有什么问题?

.h file
@interface RoomConfigurationViewController : ATBaseViewController {

}
  @property (nonatomic, strong) AttendanceSettings *settingsObject;
@end


.m file
@synthesize settingsObject = _settingsObject;


NSData *settingsData = [[NSUserDefaults standardUserDefaults]     objectForKey:kUserDefaultsSettingsObject];
self.settingsObject = [NSKeyedUnarchiver unarchiveObjectWithData:settingsData];

0 个答案:

没有答案