2015年1月21日
摘要: NSArray排序方法讲解给数组排序有着多种方式最麻烦的是sortedArrayUsingSelector:,其次是sortedArrayUsingDescriptors:,最容易使用的就是sortedArrayUsingComparator:从最容易使用的开始吧: // 原始数组 NS... 阅读全文
posted @ 2015-01-21 11:48 airy99 阅读(222) 评论(0) 推荐(0) 编辑
摘要: //获得document+(NSString *)documentsPath {NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);return [paths... 阅读全文
posted @ 2015-01-21 11:27 airy99 阅读(251) 评论(0) 推荐(0) 编辑
  2014年8月14日
摘要: 实现iOS漂亮的动画效果主要有两种方法, 一种是UIView层面的, 一种是使用CATransition进行更低层次的控制, 第一种是UIView,UIView方式可能在低层也是使用CATransition进行了封装,它只能用于一些简单的、常用的效果展现,这里写一个常用的示例代码,供大家参考。[UI... 阅读全文
posted @ 2014-08-14 17:02 airy99 阅读(135) 评论(0) 推荐(0) 编辑
摘要: _segment = [[UISegmentedControl alloc] initWithItems:@[@"aaaa", @"bbbb"]]; [_segment setFrame:CGRectMake(20, 300, 280, 30)]; [_segment setTintColor:... 阅读全文
posted @ 2014-08-14 17:00 airy99 阅读(248) 评论(0) 推荐(0) 编辑
摘要: CGFloat w = self.view.frame.size.width; UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 400, w, 0)]; [label setBackgroundColor:[UICol... 阅读全文
posted @ 2014-08-14 16:59 airy99 阅读(189) 评论(0) 推荐(0) 编辑
  2014年6月5日
摘要: #pragma mark 当需要创建控制器的view时就会调用// 当需要使用到当前控制器的view,并且view为nil,就会调用loadView来创建view// 重写这个方法的目的:就是为了自定义view// 不需要调用[super loadView];- (void)loadView{// ... 阅读全文
posted @ 2014-06-05 00:30 airy99 阅读(172) 评论(0) 推荐(0) 编辑
  2014年6月2日
摘要: 转自ibireme的博客做iOS开发总会接触到一些第三方库,这里整理一下,做一些吐槽。目前比较活跃的社区仍旧是Github,除此以外也有一些不错的库散落在Google Code、SourceForge等地方。由于Github社区太过主流,这里主要介绍一下Github里面流行的iOS库。首先整理了一份... 阅读全文
posted @ 2014-06-02 10:48 airy99 阅读(298) 评论(0) 推荐(0) 编辑
摘要: ICSDrawerController 是个 iPhone(iOS7+)左侧边绘制器控制器,包括了用户需要的所有功能,而且它还非常小,容易阅览也容易自定义。github地址:https://github.com/icecreamstudios/ICSDrawerController 阅读全文
posted @ 2014-06-02 10:38 airy99 阅读(210) 评论(0) 推荐(0) 编辑
  2014年5月14日
摘要: - (void)viewDidLoad{ [super viewDidLoad]; [self openDB]; [self select];}#pragma mark 打开数据库- (void)openDB{ NSString *dbPath = [@"17houses.db" appe... 阅读全文
posted @ 2014-05-14 11:26 airy99 阅读(159) 评论(0) 推荐(0) 编辑
摘要: --CREATE TABLE T_Student (name text, age integer, phoneNo text);-- 删除数据表,通常在上需要使用某一个表的时候,才会用到,日常开发中极少会用到此命令--DROP TABLE T_Student;-- 新增数据内容,在SQL语句中,字符... 阅读全文
posted @ 2014-05-14 11:23 airy99 阅读(164) 评论(0) 推荐(0) 编辑