💄 added twitter button in settings

This commit is contained in:
lillian rose winter 2019-11-25 14:39:07 -06:00
parent 790b1b7f43
commit 2ea70658ea
2 changed files with 24 additions and 0 deletions

View File

@ -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

View File

@ -4,6 +4,20 @@
<dict>
<key>items</key>
<array>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>hanahaki</string>
</dict>
<dict>
<key>cell</key>
<string>PSButtonCell</string>
<key>action</key>
<string>openTwitter</string>
<key>label</key>
<string>twitter: @lilyshibe</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>