为什么我收到字符串变量错误?
Why I get error for string variable?
我有声明的变量:
@property(strong, nonatomic) NSString* like_id;
我在- (void)viewDidLoad {}
中调用函数GetLike
- (void) GetLike {
if(![self.like_id isEqualToString:@""]){
// TODO
}
}
我收到错误:Thread 1, signal SIGABRT
这对我来说很好。
@interface ViewController ()
@property(strong, nonatomic) NSString* like_id;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self getLike];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
- (void)getLike {
if(![self.like_id isEqualToString:@""]){
NSLog(@"Liked !");
}
}
@end
我有声明的变量:
@property(strong, nonatomic) NSString* like_id;
我在- (void)viewDidLoad {}
GetLike
- (void) GetLike {
if(![self.like_id isEqualToString:@""]){
// TODO
}
}
我收到错误:Thread 1, signal SIGABRT
这对我来说很好。
@interface ViewController ()
@property(strong, nonatomic) NSString* like_id;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self getLike];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
- (void)getLike {
if(![self.like_id isEqualToString:@""]){
NSLog(@"Liked !");
}
}
@end