twitter button

This commit is contained in:
2020-01-03 12:37:44 +01:00
parent 632933b83f
commit 638f835008
3 changed files with 32 additions and 0 deletions

View File

@ -10,6 +10,28 @@
return _specifiers; 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 { -(void)saveTapped {
CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.yaypixxo.kage/respring"), NULL, NULL, YES); CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.yaypixxo.kage/respring"), NULL, NULL, YES);
} }

View File

@ -94,6 +94,16 @@
<key>label</key> <key>label</key>
<string>Respring</string> <string>Respring</string>
</dict> </dict>
<dict>
<key>cell</key>
<string>PSButtonCell</string>
<key>action</key>
<string>openTwitter</string>
<key>icon</key>
<string>twitter.png</string>
<key>label</key>
<string>@Ra1nPix</string>
</dict>
</array> </array>
<key>title</key> <key>title</key>
<string>Kage</string> <string>Kage</string>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB