我有声明的变量:
import 'dart:mirrors';
Uri get _currentFileUri =>
(reflect(main) as ClosureMirror).function.location.sourceUri;
void main() { ... }
我在@property(strong, nonatomic) NSString* like_id;
GetLike
- (void)viewDidLoad {}
我收到错误:- (void) GetLike {
if(![self.like_id isEqualToString:@""]){
// TODO
}
}
答案 0 :(得分:2)
这对我来说很好。
@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