Pārlūkot izejas kodu

twitter button

tags/v1.0.0
Viggo Lekdorf pirms 4 gadiem
vecāks
revīzija
638f835008
3 mainītis faili ar 32 papildinājumiem un 0 dzēšanām
  1. +22
    -0
      kageprefs/KgeRootListController.m
  2. +10
    -0
      kageprefs/Resources/Root.plist
  3. Binārs
      kageprefs/Resources/twitter.png

+ 22
- 0
kageprefs/KgeRootListController.m Parādīt failu

@@ -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);
}

+ 10
- 0
kageprefs/Resources/Root.plist Parādīt failu

@@ -94,6 +94,16 @@
<key>label</key>
<string>Respring</string>
</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>
<key>title</key>
<string>Kage</string>

Binārs
kageprefs/Resources/twitter.png Parādīt failu

Pirms Pēc
Platums: 29  |  Augstums: 29  |  Izmērs: 1.7KB

Notiek ielāde…
Atcelt
Saglabāt