IOS代码片段
2017-08-03
获取应用程序委托
FKAppDelegate* appDelegate = [UIApplication shareApplication].delegate
2017-08-03
(__bridge CFMutableStringRef)
2017-08-20
NSBundle *buddle = [NSBundle bundleWithPath:@"你的bundle文件存放路径"]; [buddle load];//这一步必须执行,否则buddle无效
2018-05-06
[self.navigationController popToRootViewControllerAnimated:YES];跳转到最顶层。
2018-09-05
过期限制访问代码。
NSInteger* _cbId = [paramDict integerValueForKey:@"cbId" defaultValue:0]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"YYYY-MM-dd HH:mm:ss"]; NSDate *date = [dateFormatter dateFromString:@"2018-09-06 9:50:00"]; NSDate *now = [NSDate date]; NSComparisonResult result3 = [date compare:now]; if(result3==NSOrderedAscending){ if (_cbId > 0) { NSDictionary *ret = @{@"code":@(-1), @"msg":@"模块过期"}; [self sendResultEventWithCallbackId:_cbId dataDict:ret errDict:nil doDelete:YES]; } return; }
posted on 2017-08-03 15:09 angelshelter 阅读(104) 评论(0) 编辑 收藏 举报