应用中,连接Json到mySql数据库,使用PHP,返回值 UserID。
现在需要将这个值用到where语句其他Json调用中。
是不是应该在plist文件中存储值?
应用中,连接Json到mySql数据库,使用PHP,返回值 UserID。
现在需要将这个值用到where语句其他Json调用中。
是不是应该在plist文件中存储值?
你将这个值保存到NSUserDefaults中:
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
// write value
[defaults setInteger:value forKey:@"value"];
[defaults synchronize];
// read
// if value is not an int but an NSNumber, change it to [defaults objectForKey:@"value"]
value = [defaults intForKey:@"value"];