2016年11月3日

摘要: /** * lineView: 需要绘制成虚线的view * lineLength: 虚线的宽度 * lineSpacing: 虚线的间距 * lineColor: 虚线的颜色 **/ - (void)drawDashLine:(UIView *)lineView lineLength:(int)l 阅读全文
posted @ 2016-11-03 14:01 小姐贫僧光天化日 阅读(160) 评论(0) 推荐(0) 编辑
 

2016年10月8日

摘要: 方法一: 自定义视图,定义一个lable,相关属性在lable里设置 核心方法: self.navigationItem.titleView = titleLabel; 方法二:用系统方法直接设置 [self.navigationController.navigationBar setTitleTe 阅读全文
posted @ 2016-10-08 15:20 小姐贫僧光天化日 阅读(1122) 评论(0) 推荐(0) 编辑
 

2016年9月29日

摘要: 因为程序要求要插入一个日历控件,该空间的要求是从当天开始及以后的六个月内的日历,上网查资料基本上都说只要获取两个条件(当月第一天周几和本月一共有多少天)就可以实现一个简单的日历,剩下的靠自己的简单逻辑就OK了,下面开始自己从开始到完成的整个过程 1,首先做NSDate类目,扩展一些方法让日期之间转换 阅读全文
posted @ 2016-09-29 20:37 小姐贫僧光天化日 阅读(5648) 评论(0) 推荐(1) 编辑
 

2016年9月26日

摘要: NSArray * array = @[@"aZ",@"ZbcAc",@"ZbcAb",@"Zd",@"Zw",@"Zz"]; NSArray * array2 = [array sortedArrayUsingComparator:^NSComparisonResult(NSString * ob 阅读全文
posted @ 2016-09-26 17:39 小姐贫僧光天化日 阅读(111) 评论(0) 推荐(0) 编辑
 

2016年9月20日

摘要: /** 一,数据存储 常用方式(5种) 1,XML属性列表 -- 保存在Doucuments文件夹 2,偏好设置(NSUserDefault)-- Library/Preference 需要配合writetoFile来配合使用,保存到沙盒 3,归档(NSKeyedArchiver) -- 实现cod 阅读全文
posted @ 2016-09-20 12:00 小姐贫僧光天化日 阅读(317) 评论(0) 推荐(0) 编辑
 

2016年9月13日

摘要: #import "ViewController.h" #import <CoreData/CoreData.h> #import "Person.h" @interface ViewController () @end @implementation ViewController { NSManag 阅读全文
posted @ 2016-09-13 20:08 小姐贫僧光天化日 阅读(120) 评论(0) 推荐(0) 编辑
 
摘要: 1,导入第三方头文件 #import "FMDB.h" //定义全局变量 @implementation InputInformationViewController { UITextField *_accountField;//帐号输入框 UITextField *_passwordsField; 阅读全文
posted @ 2016-09-13 13:33 小姐贫僧光天化日 阅读(130) 评论(0) 推荐(0) 编辑
 

2016年9月12日

摘要: //获取目录(两种方法) NSString *directory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask , YES) lastObject]; NSLog(@"%@",director 阅读全文
posted @ 2016-09-12 13:27 小姐贫僧光天化日 阅读(163) 评论(0) 推荐(0) 编辑
 

2016年9月3日

摘要: 1,设置tabBar //1.遍历取得tabBar中所有的子视图,移除上面内置的按钮 for (UIView *view in self.tabBar.subviews) { //子视图的类型是 UITabbarButton //视图1 、 视图2 、 > 视图类 //视图类、按钮类、图片视图类 > 阅读全文
posted @ 2016-09-03 19:01 小姐贫僧光天化日 阅读(156) 评论(0) 推荐(0) 编辑
 

2016年8月30日

摘要: - (NSDictionary*)requestDataWithMethod:(NSString *)method{ //含中文转换需要转码 NSString *str = [method stringByAddingPercentEscapesUsingEncoding:NSUTF8StringE 阅读全文
posted @ 2016-08-30 18:08 小姐贫僧光天化日 阅读(162) 评论(0) 推荐(0) 编辑