Last active
March 11, 2019 14:34
-
-
Save Rayer/a8044606f986045aadbdd59f5965372a to your computer and use it in GitHub Desktop.
Using block in if statements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (^(NSArray* searchImageSuffix) { | |
for(NSString* suffix in searchImageSuffix) { | |
if([shortURL hasSuffix:suffix]) | |
return TRUE; | |
} | |
return FALSE; | |
}(searchImageSuffix)) | |
{ | |
addShortenedURLMenuItem(@"Image search by GOOGLE", [@"https://www.google.com/searchbyimage?&image_url=" stringByAppendingString: shortURL]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment