-(id)initWithUserSettings:(id)userSettings mqttSender:(id)sender;
NSDictionary *settings3=[[NSDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/myfilehere.plist"];
if ([[settings3 objectForKey:@"invisiblechat"] boolValue]){
return NULL;
}
else{%orig;}
[settings3 release];
}
我不知道这段代码是否正确,我搜索了 2 天没有答案。在 -(void) 上,此代码工作得非常好,它会一直禁用 -(void),直到禁用 objecForKey。我想要的是通过切换保持 (id)mqttSender 禁用/启用,但我做不到。请问有什么帮助吗?