zoukankan      html  css  js  c++  java
  • 一些IOS开发中的小技巧

    1.打包后提交报错误

        错误信息:ERROR ITMS-90035: "Invalid Signature. Code object is not signed at all. The binary at path

                      [******.app/build-libidn.sh] 

       解决方案:在Archive 界面上 选择刚生成的那个app 右键 Show in Finder  显示包含内容-》Products->Application->应用

                     右键显示包含内容,找到文件 build-libidn.sh 删除 重新提交就可以了

    2.IOS Tabbar 挡住了tableview  半行差不多 

    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)
        {
            self.edgesForExtendedLayout = UIRectEdgeNone;
            self.extendedLayoutIncludesOpaqueBars = NO;
            self.modalPresentationCapturesStatusBarAppearance = NO;
            self.automaticallyAdjustsScrollViewInsets = YES;
    }
    

     3.IOS7 Tableview Group模式顶部有空白

    self.tableview.tableHeaderView = [[UIView alloc]       initWithFrame:CGRectMake(0.0f, 0.0f,   self.tableview.bounds.size.width, 0.01f)];

    4.Tableview 底部多余的分割线

    tableview.tableFooterView = [[UIView alloc]init];

    5.CGRectInset 的意义

       这个函数接收一个CGrect,dx,和dy 返回一个CGRect 返回的CGRect 是根据传入的CGRect和dx,dy来决定的,dx,dy 决定了放大还是缩小传入的CGrect的宽高,正数为缩小,

       负数为增大CGRectInset(rect,0,20) 这个是说明rect高度缩小20 但是中心点还是和原来的CGRect 一样。

    6.CGRectOffset的意义

      这个函数接收一个CGrect dx,和dy 返回一个CGRect 返回的CGRect 是根据传入的CGRect和dx,dy来决定的,dx为正数 原CGRect整体向右偏移,负数反之,dy为正数

     原CGRect整体向下偏移,负数反之, CGRectOffset (rect,0,20) 这个是说明原CGRect像下偏移20像素

    7.CocosPod 的安装和使用

     参考这个链接内容:http://blog.csdn.net/wzzvictory/article/details/18737437

    8.如何打包测试安装包,给真机测试机安装

    直接在Xcode里面build工程生成APP,打开生成app的路径把APP拖入iTunes 即可导出测试安装用的ipa安装包,把ipa包给测试用户,

    用户使用iTunes 同步到手机实现模拟上线后在线升级的情况。

    9.如何设置统一的导航栏背景颜色颜色

     新建一个继承UINavigationController 的子类

     - (void)viewWillAppear:(BOOL)animated{
        [self.navigationBar setTintColor:[UIColor whiteColor]];
        [self.navigationBar setBarTintColor:[UIColor colorWithRed:151.0/255.0 green:1.0/255.0 blue:2.0/255.0 alpha:1.0]]; //IOS7  设置导航栏和状态栏的背景颜色天猫红
        [self.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],NSForegroundColorAttributeName,nil]];
    
    }
    - (UIStatusBarStyle)preferredStatusBarStyle{
      return UIStatusBarStyleLightContent;//设置状态栏字体为白色的
    }

    10.使用AFNetworking 出现报错

       错误信息:Error: Error Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable content-type: text/html

       解决方案:

    AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
    manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"]
  • 相关阅读:
    20162314 《Program Design & Data Structures》Learning Summary Of The Ninth Week
    20162314 《Program Design & Data Structures》Learning Summary Of The Ninth Week
    20162314 《Program Design & Data Structures》Learning Summary Of The Eighth Week
    20162307 2016-2017-2《程序设计与数据结构》课程总结
    2017-2018-1 20162307 实验五
    2017-2018-1 JAVA实验站 冲刺
    20162307 课堂测试 hash
    2017-2018-1 JAVA实验站 第八周作业
    20162307 实验四 图的实现与应用
    2017-2018-1 JAVA实验站 第六、七周作业
  • 原文地址:https://www.cnblogs.com/try-wyh/p/4686558.html
Copyright © 2011-2022 走看看