zoukankan      html  css  js  c++  java
  • 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;
        }
  • 相关阅读:
    字符匹配算法之KMP
    rabbitmq_hearbeat
    rabbitmq_config
    postgres SQL编译过程
    postgres启动过程分析
    postgres源码目录结构
    Js两种post方式(转)
    PHP-MySQL,PHP-MySQLi,PDO的差异
    CSS属性中Display与Visibility的不同
    PHP中include路径修改
  • 原文地址:https://www.cnblogs.com/angelshelter/p/7279848.html
Copyright © 2011-2022 走看看