@interface PaneBean : NSObject
@property(nonatomic,copy) NSString *name;
@property(nonatomic,copy) NSString *type;
@property(nonatomic,assign) NSInteger width;
@end
Run Code Online (Sandbox Code Playgroud)
我有一个如上所示的PaneBean.
我是应该使用@property(nonatomic,copy)还是@property(nonatomic,strong)为了我(NSString *) name?他们之间有什么区别?
为NSInteger编写'assign'是正确的吗?
任何帮助表示赞赏.谢谢!
我想要做的是在iPad中将区域格式从英语更改为中国时更改时间格式Settings->Gerneral->International->Region Format.
我试过这个:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateCalendar) name: UIApplicationSignificantTimeChangeNotification object:nil];
-(void)updateCalendar{
self.text=[Toolbox formatDate:dateFormatter WithFormateString:@"EEEE MMMM dd"];
}
Run Code Online (Sandbox Code Playgroud)
但它没有用.我UIApplicationSignificantTimeChangeNotification无法收到任何通知.或许不适用于区域格式更改的通知.是否有通知类型可以做到这一点?
任何帮助都会得到感谢.谢谢!