wift: Login to WordPress from your iOS App

Swift: Login to WordPress from your iOS App

Open Facebook Page from iOS App OpenUrl

You have to use the facebook ID for the given page rather than the vanity URL. To get the pages ID, enter your page’s vanity name at the following URL and copy the value for “id":

https://graph.facebook.com/yourappspage

Once you have the id, you can set up the method to check if FB is installed using the canOpenURL method and serve the appropriate content for both states:

NSURL *facebookURL = [NSURL URLWithString:@"fb://profile/113810631976867″];
if ([[UIApplication sharedApplication] canOpenURL:facebookURL]) {
[[UIApplication sharedApplication] openURL:facebookURL];
} else {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://facebook.com"]];
}

http://stackoverflow.com/questions/16589367/open-link-to-facebook-page-from-ios-app

Objective C : Array iteration

Normal:

[sampleArray enumerateObjectsUsingBlock:^(NSString *symbol, NSUInteger idx, BOOL *stop) {
NSLog(@"%@", symbol);

if ([symbol isEqualToString:@"8″]) {
*stop = YES;
}
}];

Reverse:

[sampleArray enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(NSString *symbol, NSUInteger idx, BOOL *stop) {
NSLog(@"%@", symbol);

if ([symbol isEqualToString:@"8″]) {
*stop = YES;
}
}];

http://myappglog.blogspot.hk/2013_08_01_archive.html