tweak to change the "custom no older notifications" text introduced in iOS 11
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

45 lines
1.5KB

  1. #include "CNONRootListController.h"
  2. @implementation CNONRootListController
  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)apply {
  33. [self.view endEditing:YES];
  34. //CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.yaypixxo.cnon/respring"), NULL, NULL, YES);
  35. }
  36. @end