是否可以在SDK 3.x上反转Geocode当前位置?我需要简单地获取当前位置的邮政编码.我见过的唯一例子是使用CoreLocation,我不认为它是在SDK 4之前引入的.
我从php脚本中提取图片的位置,如果没有图片位置,它会在JSON输出中显示"null".这在我的代码中抛出异常.这是不起作用的代码:
NSString *piclocation = picloc;
if(piclocation == nil || @"null"){
}else{
NSString *mutableUrlString = @"https://www.mypage.com/uploads";
mutableUrlString = [mutableUrlString stringByAppendingString: piclocation];
NSLog(mutableUrlString);
NSURL *url = [NSURL URLWithString: mutableUrlString];
UIImage *image = [UIImage imageWithData: [NSData dataWithContentsOfURL:url]];
imageView.image = image;
}
Run Code Online (Sandbox Code Playgroud)
错误是:由于未捕获的异常'NSInvalidArgumentException'终止应用程序,原因:' * - [NSNull length]:无法识别的选择器发送到实例0x98d5a0'任何建议?
我有一个简单的声明:
$update1 = mysql_query("UPDATE leads SET call = 'Call 2', user = '' WHERE ID = '$rowid'") or die(mysql_error());
Run Code Online (Sandbox Code Playgroud)
这是抛出此错误消息:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'call = 'Call 2', user = '' WHERE ID = '29657'' at line 1
Run Code Online (Sandbox Code Playgroud)
我认为通常意味着"呼叫"之前的陈述是问题,但一切对我来说都很好.有任何想法吗?