ato*_*nda 1 string iphone if-statement objective-c nsstring
我是objective-c的新手,我想知道如何获取NSString的stringValue,如果它等于照片,那么 //something
这是我正在使用的代码,NSLog打印"照片".
我正在为iPhone开发.
NSString *getPageType = [self.webView stringByEvaluatingJavaScriptFromString:
@"document.getElementById('pageType').name"];
NSLog(@"%@", getPageType);
if (getPageType == @"photo")
{
[UIButton animateWithDuration:3 animations:^{
downloadOverlay.alpha = 1;
downloadOverlay.alpha = 0;
}];
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
115 次 |
| 最近记录: |