摘要: 这是一个8.0之后才有的方法,深深地受害了。。。客户给老板演示的时候就这个方法导致的崩溃。。。。演示的机器是ios7.2.。。 阅读全文
posted @ 2014-11-25 10:11 1oo1 阅读(255) 评论(0) 推荐(0)
摘要: UIScrollView在放大的时候可以居中,但是缩小的时候总是跑到左上角,在网上找了好久,经过验证,以下是最完美的解决方案:#pragma mark - UIScrollViewDelegate-(UIView*)viewForZoomingInScrollView:(UIScrollView *... 阅读全文
posted @ 2014-11-22 16:44 1oo1 阅读(437) 评论(0) 推荐(0)
摘要: 打开/前往:⌘T前往文件⌘⌃P前往项目⌘R前往 method⌘⇧P命令提示⌃G前往行⌃ `python 控制台———————编辑:⌘L选择行 (重复按下将下一行加入选择)⌘D选择词 (重复按下时多重选择相同的词进行多重编辑)⌃⇧M选择括号内的内容⌘⇧↩在当前行前插入新行⌘↩在当前行后插入新行⌃⇧K删... 阅读全文
posted @ 2014-11-21 09:50 1oo1 阅读(246) 评论(0) 推荐(0)
摘要: 在用CoreBluetooth 做蓝牙数据传输时,把设备设为周边设备报此错误:Characteristics with cached values must be read-only经查询是因为在构造 Characteristic 时设置了 Value,根据官方说明,当Value 不是nil 时,只... 阅读全文
posted @ 2014-11-11 16:02 1oo1 阅读(881) 评论(0) 推荐(0)
摘要: 1、设置UIScrollView滚动的时候只往一个方向:#pragma mark ScrollViewDelegate-(void)scrollViewWillBeginDragging:(UIScrollView *)scrollView{// NSLog(@"%@", NSStringFr... 阅读全文
posted @ 2014-10-17 11:37 1oo1 阅读(178) 评论(0) 推荐(0)
摘要: 碰到一个这样的错误:this class is not key value coding-compliant for the key scrollListView经查询,是因为我把自动创建的xib文件删除了,导致IB与代码中的IBOutlet不能对应。 阅读全文
posted @ 2014-10-16 16:57 1oo1 阅读(192) 评论(0) 推荐(0)
摘要: 程序在设备上运行时发生闪退,调试的时候发现未捕捉的异常,但是这些异常信息很有限,不能有效定位代码段,需要为app加入未捕捉异常:摘自:http://www.cnblogs.com/dqshll/archive/2012/08/29/2661933.html在AppDelegate.m中添加函数:vo... 阅读全文
posted @ 2014-10-13 11:39 1oo1 阅读(226) 评论(0) 推荐(0)
摘要: 在一个View中单独添加 UITabBar,但是时不时的就报错。经查询:原因是因为在另一个view没有加载完时就把含有TabBar的View加载了,正确的时放在 viewDidAppear:方法中。错误代码:// 错误代码// Main Controller @implementation Main... 阅读全文
posted @ 2014-10-09 17:42 1oo1 阅读(311) 评论(0) 推荐(0)
摘要: 在Xcode6 中创建的app,在ios7.1的iphone5设备和iphone模拟器中不能显示全屏,用 [UIScreen mainScreen].bounds.size.height得到的值竟然是480!从stackoverflow中找到的答案:原文地址http://stackoverflow.... 阅读全文
posted @ 2014-10-08 17:23 1oo1 阅读(1498) 评论(0) 推荐(0)
摘要: Chapter 28 UIStoryboard1. A segue moves another view controller’s view onto the screen when triggered and is represented by an instance of UIStoryboar... 阅读全文
posted @ 2014-10-07 19:23 1oo1 阅读(144) 评论(0) 推荐(0)