摘要: 在ios4.0及以后鼓励使用animateWithDuration方法来实现动画效果。当然,以往的begin/commit的方法依然使用,下面详细解释一下animateWithDuration的使用方法。函数原型:+ (void)animateWithDuration:(NSTimeInterval)duration animations:(void (^)(void))animations+ (void)animateWithDuration:(NSTimeInterval)duration animations:(void (^)(void))animations completion:( 阅读全文
posted @ 2013-10-31 13:39 小乐" 阅读(686) 评论(0) 推荐(0) 编辑
摘要: -(void)GetUpdate { NSDictionary *infoDict = [[NSBundle mainBundle] infoDictionary]; NSString *nowVersion = [infoDict objectForKey:@"CFBundleVersion"]; NSURL *url = [NSURL URLWithString:@"http://itunes.apple.com/lookup?id=***"]; NSString * file = [NSString stringWithContentsOfURL: 阅读全文
posted @ 2013-09-12 14:03 小乐" 阅读(247) 评论(0) 推荐(0) 编辑
摘要: http://www.2cto.com/kf/201301/183054.html 阅读全文
posted @ 2013-09-06 22:59 小乐" 阅读(196) 评论(0) 推荐(0) 编辑
摘要: layoutSubviews方法根据苹果官方帮助文档对layoutSubviews方法的解释:此方法用来重新定义子元素的位置和大小。当子类重写此方法,用来实现UI元素的更精确布局。如果要让布局重新刷新,那么就调用setNeedsLayout,即setNeedsLayout方法会默认用layoutSubViews方法。setNeedsDisplay方法与setNeedsLayOut方法相似的方法是setNeedsDisplay方法。该方法在调用时,会自动调用drawRect方法。drawRect方法主要用来画图。总结所以,当需要刷新布局时,用setNeedsLayOut方法;当需要重新绘画时,调 阅读全文
posted @ 2013-09-05 11:17 小乐" 阅读(307) 评论(0) 推荐(0) 编辑
摘要: iOS开发常用的第三方类库 阅读全文
posted @ 2013-08-16 14:39 小乐" 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 获得图片下载的路径,通过NSFileManager removeItemAtPathNSString *localPath = [NSHomeDirectory()stringByAppendingPathComponent:@"Documents"] ;NSFileManager *fileManager = [NSFileManager defaultManager];NSArray *fileArray = [fileManager contentsOfDirectoryAtPath:localPath error:nil];for (NSString *str in 阅读全文
posted @ 2013-07-08 17:33 小乐" 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 官方demohttp://download.csdn.net/detail/jlyidianyuan/5726749在tableView:cellForRowAtIndexPath方法中// Only load cached images; defer new downloads until scrolling ends //图片是否存在 if (!appRecord.appIcon) { //tableView是否在拖拽或减速 if (self.tableView.dragging == NO && self.tableView.decelerating =... 阅读全文
posted @ 2013-07-08 17:28 小乐" 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 很多时候模拟器的沙盒目录是隐藏的 我们可以打开通过在 finder 上面选择 go to the folder 然后输入 /Users/电脑的用户名/Library/Application Support/iPhone Simulator/ 然后进入 阅读全文
posted @ 2013-07-04 11:47 小乐" 阅读(459) 评论(0) 推荐(0) 编辑
摘要: 转自http://www.cnblogs.com/iOS-Blog/archive/2013/02/05/2892936.html内存泄漏是当一个对象或变量在使用完成后没有释放掉,那么如果我们走了另外一个极端情况会什么样呢?这就导致过渡释放(over release)问题,从而使对象“僵尸化”,对象称为僵尸(zombies)对象。一个对象已经被释放过了,或者调用者没有这个对象的所有权而释放它, 都会造成过渡释放,产生僵尸对象。僵尸对象或许对很多人听起来很恐怖、也很陌生,如果要说起EXEC_BAD_ACCESS异常,可能大家并不陌生。试图调用僵尸对象方法应用会崩溃(应用直接跳出),并抛出异常EX 阅读全文
posted @ 2013-07-03 18:31 小乐" 阅读(358) 评论(0) 推荐(0) 编辑
摘要: MBProgressHUD 下载地址https://github.com/matej/MBProgressHUDSVProgressHUD 下载地址https://github.com/samvermette/SVProgressHUDTKAlertCenter 百度搜 阅读全文
posted @ 2013-07-03 17:17 小乐" 阅读(231) 评论(0) 推荐(0) 编辑