10 2014 档案
摘要:1、设置UIScrollView滚动的时候只往一个方向:#pragma mark ScrollViewDelegate-(void)scrollViewWillBeginDragging:(UIScrollView *)scrollView{// NSLog(@"%@", NSStringFr...
阅读全文
摘要:碰到一个这样的错误:this class is not key value coding-compliant for the key scrollListView经查询,是因为我把自动创建的xib文件删除了,导致IB与代码中的IBOutlet不能对应。
阅读全文
摘要:程序在设备上运行时发生闪退,调试的时候发现未捕捉的异常,但是这些异常信息很有限,不能有效定位代码段,需要为app加入未捕捉异常:摘自:http://www.cnblogs.com/dqshll/archive/2012/08/29/2661933.html在AppDelegate.m中添加函数:vo...
阅读全文
摘要:在一个View中单独添加 UITabBar,但是时不时的就报错。经查询:原因是因为在另一个view没有加载完时就把含有TabBar的View加载了,正确的时放在 viewDidAppear:方法中。错误代码:// 错误代码// Main Controller @implementation Main...
阅读全文
摘要:在Xcode6 中创建的app,在ios7.1的iphone5设备和iphone模拟器中不能显示全屏,用 [UIScreen mainScreen].bounds.size.height得到的值竟然是480!从stackoverflow中找到的答案:原文地址http://stackoverflow....
阅读全文
摘要:Chapter 28 UIStoryboard1. A segue moves another view controller’s view onto the screen when triggered and is represented by an instance of UIStoryboar...
阅读全文
摘要:Chapter 27 Controlling Animations1. The simplest block-based animation method on UIView is animateWithDuration:animations:. This method takes in the d...
阅读全文
摘要:Chapter 23 Core Data1. Core Data is only able to store certain data types in its store, and UIImage is not one of these types. Instead, you declared t...
阅读全文
摘要:Chapter 21 WebServices and UIWebView1. Usually, fetch data from a web server using four handy classes: NSURL, NSURLRequest, NSURLSessionTask, and NSUR...
阅读全文
摘要:Chapter 20 Dynamic Type1. The Dynamic Type system is centered around text styles. When a font is requested for a given text style, the system will use...
阅读全文
摘要:Chapter 19 Subclassing UITableViewCell1. iOS provides a convenient suite of functions to create offscreen contexts and produce images from them. To cr...
阅读全文
摘要:#pragma mark - Set thumbnailImage-(UIImage*)setThumbnailFromImage:(UIImage *)image{ CGSize origImageSize = image.size; // The rectangle of t...
阅读全文
摘要:Chapter 18 Saving, Loading, and Application State1. Archiving is one of the most common ways of persisting model objects on iOS. Archiving an object i...
阅读全文
摘要:Chapter 17 Autorotation, Popover Controller, and Modal View Controllers1.There are two distinct orientations in iOS: device orientation and interface ...
阅读全文
摘要:调试用的iPad mini 被同事不小心更升级到了8.0。然后,今天调试半天程序一直崩溃,查了半天愣是没有找到原因。无意中撇到Organizer 中的 Device 版本竟然是8了,卧槽,找另一个7.1.2的机器试了下,一切ok啊。下班后下载了7.1.2的固件,回退失败!网上查到几天前苹果把shsh...
阅读全文

浙公网安备 33010602011771号