diff --git a/kageprefs/KgeRootListController.m b/kageprefs/KgeRootListController.m index da794d6..fb64b84 100644 --- a/kageprefs/KgeRootListController.m +++ b/kageprefs/KgeRootListController.m @@ -10,6 +10,28 @@ return _specifiers; } +-(void)openTwitter { + NSURL *url; + + if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"tweetbot:"]]) { + url = [NSURL URLWithString:@"tweetbot:///user_profile/Ra1nPix"]; + } + else if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"twitterrific:"]]) { + url = [NSURL URLWithString:@"twitterrific:///profile?screen_name=Ra1nPix"]; + } + else if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"tweetings:"]]) { + url = [NSURL URLWithString:@"tweetings:///user?screen_name=Ra1nPix"]; + } + else if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"twitter:"]]) { + url = [NSURL URLWithString:@"twitter://user?screen_name=Ra1nPix"]; + } + else { + url = [NSURL URLWithString:@"https://mobile.twitter.com/Ra1nPix"]; + } + + [[UIApplication sharedApplication] openURL:url]; +} + -(void)saveTapped { CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.yaypixxo.kage/respring"), NULL, NULL, YES); } diff --git a/kageprefs/Resources/Root.plist b/kageprefs/Resources/Root.plist index b2385bf..ae75ead 100644 --- a/kageprefs/Resources/Root.plist +++ b/kageprefs/Resources/Root.plist @@ -94,6 +94,16 @@ label Respring + + cell + PSButtonCell + action + openTwitter + icon + twitter.png + label + @Ra1nPix + title Kage diff --git a/kageprefs/Resources/twitter.png b/kageprefs/Resources/twitter.png new file mode 100644 index 0000000..3f9a332 Binary files /dev/null and b/kageprefs/Resources/twitter.png differ