diff --git a/hanahakiprefs/HANARootListController.m b/hanahakiprefs/HANARootListController.m index dbe2060..15513a5 100644 --- a/hanahakiprefs/HANARootListController.m +++ b/hanahakiprefs/HANARootListController.m @@ -17,4 +17,14 @@ waitpid(respringPid, NULL, WEXITED); } +- (void)openTwitter { + if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"twitter://"]]) { + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"twitter://user?screen_name=lilyshibe"] options:@{} completionHandler:nil]; + } + + else { + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://twitter.com/lilyshibe"]]; + } +} + @end diff --git a/hanahakiprefs/Resources/Root.plist b/hanahakiprefs/Resources/Root.plist index d4d193f..875c854 100644 --- a/hanahakiprefs/Resources/Root.plist +++ b/hanahakiprefs/Resources/Root.plist @@ -4,6 +4,20 @@ items + + cell + PSGroupCell + label + hanahaki + + + cell + PSButtonCell + action + openTwitter + label + twitter: @lilyshibe + cell PSGroupCell