一些IOS开发中的小技巧
2015-07-29 17:25
375 查看
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 的安装和使用
参考这个链接内容:/article/2036316.html8.如何打包测试安装包,给真机测试机安装
直接在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"]
相关文章推荐
- iOS开发多线程篇—NSOperation基本操作
- IOS代码收集
- iOS开发多线程篇—NSOperation简单介绍
- 关于QQ的SSO登录
- iOS开发集成支付宝之:rsa_private read error : private key is NULL
- Mac IOS开发环境搭建
- iOS 几种设计模式
- iOS 7+自定义导航栏背景,标题和返回按钮文字颜色
- ios开发多个mac共用证书(ios开发证书移植)
- 小白学开发(iOS)OC_类的互引用(2015-07-29)
- 小白学开发(iOS)OC_new方法原理(2015-07-29)
- 小白学开发(iOS)OC_构造方法(2015-07-29)
- 小白学开发(iOS)OC_私有方法(2015-07-28)
- 小白学开发(iOS)OC_ id类型(2015-07-28)
- 小白学开发(iOS)OC_get/set 方法重写(2015-07-28)
- 苹果开发 笔记(54)ZipArchive
- 小白学开发(iOS)OC_property和synthesize(2015-07-28)
- IOS开发-16.自定义不等高cell
- ios 常用的正则表达式
- iOS开发-Day12-C的复习