sforkowany z yaypixxo/CustomNoOlderNotifications
42 wiersze
1.2 KiB
Objective-C
42 wiersze
1.2 KiB
Objective-C
#include "CNONRootListController.h"
|
|
//#import <spawn.h>
|
|
|
|
@implementation CNONRootListController
|
|
|
|
- (NSArray *)specifiers {
|
|
if (!_specifiers) {
|
|
_specifiers = [[self loadSpecifiersFromPlistName:@"Root" target:self] retain];
|
|
}
|
|
|
|
return _specifiers;
|
|
}
|
|
|
|
- (void)apply {
|
|
[self.view endEditing:YES];
|
|
}
|
|
|
|
- (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 options:@{} completionHandler:nil];
|
|
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];
|
|
}
|
|
|
|
@end
|