随笔分类 -  IOS

1 2 3 4 5 ··· 8 下一页
摘要:override func viewDidLoad() { super.viewDidLoad() if let imageView = self.findNavLineView(view: navigationBar) { // 在分隔线上添加一个跟分隔线大小一模一样的View, 然后修改颜色即可 let navBarLineView = UIView() navBarLineView.fram 阅读全文
posted @ 2019-12-10 14:36 Rinpe 阅读(1800) 评论(0) 推荐(0)
摘要:没有使用返回值时, 警告 swift: OC: 没有使用返回值时, 不警告 swift: OC: To prevent the compiler from flooding us with warnings when importing Objective-C code the @discardab 阅读全文
posted @ 2017-04-26 13:58 Rinpe 阅读(972) 评论(0) 推荐(0)
摘要:只需要在自定义的Cell中添加以下代码即可 阅读全文
posted @ 2016-11-25 10:58 Rinpe 阅读(854) 评论(1) 推荐(0)
摘要:只需要在AppDelegate如下函数添加: 因为重写了上面这个函数, 就不会调用如下函数: 所以就会出现这种错误... 阅读全文
posted @ 2016-11-16 09:53 Rinpe 阅读(1301) 评论(0) 推荐(0)
摘要:Automator 新建一个 Application<img src="https://pic1.zhimg.com/78ce627667e5b8c7ab1bcff125e19968_b.png" data-rawwidth="97" data-rawheight="109" 阅读全文
posted @ 2016-11-01 10:43 Rinpe 阅读(2958) 评论(0) 推荐(0)
摘要:解决方法是: 删除/Users/Rinpe/Library/Developer/Xcode/DerivedData下对应的文件夹即可. 阅读全文
posted @ 2016-10-14 10:37 Rinpe 阅读(2095) 评论(0) 推荐(0)
摘要:出现这个这个错误, 有可能是由于你直接通过一个数组的索引获取一个对象(或模型)然后直接调用这个对象(或模型)的某个方法 例如: NSString *status = [self.models[indexPath.row] status]; 应该改为: RPModel *model = self.mo 阅读全文
posted @ 2016-09-24 16:57 Rinpe 阅读(2932) 评论(0) 推荐(0)
摘要:https://onevcat.com/2016/08/notification/ 阅读全文
posted @ 2016-09-24 15:42 Rinpe
摘要:Custom scheme URL 在WKWebView中默认是不支持的 (但Safari可以). 我们可以通过NSError来进行一些处理从而使得程序可以正常跳转: Note: 在iOS9中,如果你要想使用canOpenURL, 你必须添加URL schemes到Info.plist中的白名单, 阅读全文
posted @ 2016-09-22 17:41 Rinpe 阅读(5072) 评论(0) 推荐(0)
摘要:使用WKWebView的时候会出现明明自己做的一些页面有提示框, 为什么使用别人的页面提示框总是不显示, 其实很大部分原因是因为该提示框是通过JS调用的, 需要实现WKUIDelegate来进行监听 这里需要注意, completionHandler一定要调用, 否则会出错! 阅读全文
posted @ 2016-09-21 21:00 Rinpe 阅读(2800) 评论(0) 推荐(0)
摘要:方式一: 方式二: 阅读全文
posted @ 2016-09-07 17:27 Rinpe 阅读(7288) 评论(0) 推荐(0)
摘要:解决方法: animation.removedOnCompletion = NO; 阅读全文
posted @ 2016-09-01 17:22 Rinpe 阅读(2040) 评论(0) 推荐(0)
摘要:http://stackoverflow.com/questions/37838487/error-itms-90167-no-app-bundles-found-in-the-package 简单说: 简单说, 大部分出现这种情况的是由于升级了系统到macOS Sierra... 解决方法: 1. 阅读全文
posted @ 2016-08-22 17:18 Rinpe 阅读(931) 评论(0) 推荐(0)
摘要:iOS设备 iOS设备的屏幕的大小、分辨率以及比例因数(Scale Factor)[1]。 iPhone * 在iPhone 6 Plush以及iPhone 6s Plush中,实际分辨率为1080X1920,在开发中,以1242X2208进行适配。 iPad 在Xcassets中,图片名称不再重要 阅读全文
posted @ 2016-07-14 12:28 Rinpe 阅读(4928) 评论(0) 推荐(0)
摘要:解决方法: However, the proper way to fix this is to use the new UIAlertController API on iOS 8 (i.e. use if ([UIAlertController class]) ... to test for it 阅读全文
posted @ 2016-07-14 11:42 Rinpe 阅读(3436) 评论(0) 推荐(0)
摘要:*** Terminating app due to uncaught exception 'com.google.greenhouse', reason: 'Error Domain=com.google.greenhouse Code=-102 "Unable to correctly conf 阅读全文
posted @ 2016-07-06 22:53 Rinpe 阅读(1693) 评论(0) 推荐(0)
摘要:遇到一个问题,写了一个分类,但原先类的属性不够用。添加一个属性,调用的时候崩溃了,说是找不到getter、setter方法。查了下文档发现,OC的分类允许给分类添加属性,但不会自动生成getter、setter方法。有没有解决方案呢?有,通过运行时建立关联引用。接下来以添加一个这样的属性为例: 1、 阅读全文
posted @ 2016-06-27 16:30 Rinpe 阅读(4204) 评论(0) 推荐(0)
摘要:原本使用正常的情况, 切换为测试库突然出现这个错误, 网上搜索并排查后得出导致这个问题的原因: (1)就是你的除数为0(2)除数或者被除数为null 找出你出错的界面, 并打断点, 看看是否出现上面两种情况即可... 阅读全文
posted @ 2016-06-22 17:10 Rinpe 阅读(1347) 评论(0) 推荐(0)
摘要:Swift: OC: 阅读全文
posted @ 2016-06-21 11:45 Rinpe 阅读(4371) 评论(0) 推荐(1)

1 2 3 4 5 ··· 8 下一页