hide/show/change stuff on the LS and HS
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

KgeRootListController.m 1.5KB

il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #include "KgeRootListController.h"
  2. @implementation KgeRootListController
  3. - (NSArray *)specifiers {
  4. if (!_specifiers) {
  5. _specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self];
  6. }
  7. return _specifiers;
  8. }
  9. -(void)openTwitter {
  10. NSURL *url;
  11. // check which of these apps are installed
  12. if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"tweetbot:"]]) {
  13. url = [NSURL URLWithString:@"tweetbot:///user_profile/Ra1nPix"];
  14. }
  15. else if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"twitterrific:"]]) {
  16. url = [NSURL URLWithString:@"twitterrific:///profile?screen_name=Ra1nPix"];
  17. }
  18. else if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"tweetings:"]]) {
  19. url = [NSURL URLWithString:@"tweetings:///user?screen_name=Ra1nPix"];
  20. }
  21. else if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"twitter:"]]) {
  22. url = [NSURL URLWithString:@"twitter://user?screen_name=Ra1nPix"];
  23. }
  24. else {
  25. url = [NSURL URLWithString:@"https://mobile.twitter.com/Ra1nPix"];
  26. }
  27. // open my profile in the app chosen above
  28. // if you're compiling with an iOS 10 or lower sdk you can leave out options:@{} and completionHandler:nil
  29. [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];
  30. }
  31. // send respring notification
  32. -(void)saveTapped {
  33. CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.yaypixxo.kage/respring"), NULL, NULL, YES);
  34. }
  35. @end