|
|
|
|
|
|
|
|
-(void)openTwitter { |
|
|
-(void)openTwitter { |
|
|
NSURL *url; |
|
|
NSURL *url; |
|
|
|
|
|
|
|
|
|
|
|
// check which of these apps are installed |
|
|
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"tweetbot:"]]) { |
|
|
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"tweetbot:"]]) { |
|
|
url = [NSURL URLWithString:@"tweetbot:///user_profile/Ra1nPix"]; |
|
|
url = [NSURL URLWithString:@"tweetbot:///user_profile/Ra1nPix"]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
url = [NSURL URLWithString:@"https://mobile.twitter.com/Ra1nPix"]; |
|
|
url = [NSURL URLWithString:@"https://mobile.twitter.com/Ra1nPix"]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// open my profile in the app chosen above |
|
|
|
|
|
// if you're compiling with an iOS 10 or lower sdk you can leave out options:@{} and completionHandler:nil |
|
|
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil]; |
|
|
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// send respring notification |
|
|
-(void)saveTapped { |
|
|
-(void)saveTapped { |
|
|
CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.yaypixxo.kage/respring"), NULL, NULL, YES); |
|
|
CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.yaypixxo.kage/respring"), NULL, NULL, YES); |
|
|
} |
|
|
} |