Skip to content

Instantly share code, notes, and snippets.

[Rule]
DOMAIN-KEYWORD,google,Proxy,force-remote-dns
DOMAIN-KEYWORD,facebook,Proxy,force-remote-dns
DOMAIN-KEYWORD,youtube,Proxy,force-remote-dns
DOMAIN-KEYWORD,twitter,Proxy,force-remote-dns
DOMAIN-KEYWORD,instagram,Proxy,force-remote-dns
DOMAIN-KEYWORD,gmail,Proxy,force-remote-dns
DOMAIN-KEYWORD,blogspot,Proxy
DOMAIN-SUFFIX,twimg.com,Proxy,force-remote-dns
@soupsueapple
soupsueapple / gist:397ddfe571c9dcd758e6
Created April 29, 2015 07:35
iOS7 + customBackBarButton
- (void)addCustomBackBarButton{
UIImage *image = [UIImage imageNamed:@"back.png"];
UIButton *leftButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, image.size.width + 40, image.size.height)];
[leftButton setImage:image forState:UIControlStateNormal];
[leftButton setTitle:@"返回" forState:UIControlStateNormal];
[leftButton addTarget:self action:@selector(onBack) forControlEvents:UIControlEventTouchUpInside];
UILongPressGestureRecognizer *recognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPressGestureRecognizerHandle:)];
[recognizer setMinimumPressDuration:0.4f];
蜂窝网络:prefs:root=MOBILEDATASETTINGSID
定位服务:prefs:root=LOCATIONSERVICES
VPN:prefs:root=General&path=VPN
UILocalNotification *notification=[[UILocalNotification alloc] init];
NSDate *now=[NSDate dateWithString:self.receiveDate withFormat:@"yyyy-MM-dd HH:mm:ss"];
notification.fireDate=[now dateByAddingTimeInterval:6];
notification.repeatInterval=0;
notification.timeZone=[NSTimeZone defaultTimeZone];
notification.soundName = UILocalNotificationDefaultSoundName;
notification.alertBody=self.title;
notification.alertAction = @"打开"; //提示框按钮
[[UITableView appearance] setSeparatorStyle:UITableViewCellSeparatorStyleNone];
[[UITabBar appearance] setBackgroundImage:[UIImage imageNamed:@"tabbar_backgroud.png"]];
[[UITabBar appearance] setSelectionIndicatorImage:[UIImage imageNamed:@"tabbaritem_selectbackgroud.png"]];
[[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
UIColorFromRGB(0x888888), UITextAttributeTextColor,
nil] forState:UIControlStateNormal];
[[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor whiteColor], UITextAttributeTextColor,