I’m new to objective-c and I would like to know how to get the stringValue of an NSString and if it’s equal to photo then do //something
This is the code that I’m using, the NSLog prints “photo”.
I’m developing for an 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;
}];
}
should do the trick.