zoukankan      html  css  js  c++  java
  • iOS huhuProject积累

    1. 字符串转时间 : 时区问题

        formatter.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0];

        NSLog(@"%@",[NSTimeZone systemTimeZone]);
        NSLog(@"%@",[NSTimeZone localTimeZone]);

    2.

        // 通知中心监听屏幕方向
        [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(changeRotate:) name:UIApplicationDidChangeStatusBarFrameNotification object:nil];
    #pragma mark - 监听屏幕方向
    - (void)changeRotate:(NSNotification*)noti {
        if ([[UIDevice currentDevice] orientation] == UIInterfaceOrientationPortrait
            || [[UIDevice currentDevice] orientation] == UIInterfaceOrientationPortraitUpsideDown) {
            //竖屏
            NSLog(@"竖屏");
            CGFloat scale = 368.0/GUIScreenWidth;
            self.player.playerView.frame = CGRectMake(0, 20, GUIScreenWidth, 640/scale);
            self.ppBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(self.player.playerView.frame), 49, 49)];
            
        } else {
            //横屏
            NSLog(@"横屏");
            self.player.playerView.frame = CGRectMake(0, 0, GUIScreenWidth, GUIScreenHeight);
        }
    }

     3. 显示一个view,使用navigationViewController的push 的动画效果;

    4. baseViewController  架构

    5, user单例

    6,定义标准文件

    7,https 证书

    8, 语言国际化,本地化

    9,nav  and  tab

  • 相关阅读:
    nginx 转发避免携带端口
    docker-compose 搭建php+nginx+mysql+redis
    20+个JavaScript单行代码
    IaaS,PaaS,SaaS 的区别
    C# String和StringBuilder的区别
    Vue基本语法
    Gitee仓库使用方法
    6个实例详解如何把if-else代码重构成高质量代码
    Redis常见问题
    winform程序打包成exe文件
  • 原文地址:https://www.cnblogs.com/code-Officer/p/6848123.html
Copyright © 2011-2022 走看看