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;
        }
  • 相关阅读:
    Spring Mvc和Mybatis的多数据库访问配置过程
    Git下解决冲突
    安装Git
    数据库优化
    Ubuntu版 微信
    ssh框架简介
    写代码的习惯
    CentOS 7 安装 docker 并搭建私有仓库
    IPv4地址分类及特征
    Xcode 7.0 Could not find developer disk image
  • 原文地址:https://www.cnblogs.com/angelshelter/p/7279848.html
Copyright © 2011-2022 走看看