摘要: 本地通知,local notification,用于基于时间行为的通知,比如有关日历或者todo列表的小应用。另外,应用如果在后台执行,iOS允许它在受限的时间内运行,它也会发现本地通知有用。比如,一个应用,在后台运行,向应用的服务器端获取消息,当消息到达时,通过本地通知机制通知用户。本地通知是UI... 阅读全文
posted @ 2015-12-10 16:10 徐明清 阅读(275) 评论(0) 推荐(1) 编辑
摘要: 128/0/0 深红255/0/0红255/0/255粉红255/153/204玫瑰红153/51/0褐色255/102/0桔黄255/153/0浅桔黄255/204/0金色255/204/153棕黄51/51/0橄榄绿128/128/0深黄153/204/0酸橙色255/255/0黄色255/2... 阅读全文
posted @ 2015-06-08 10:36 徐明清 阅读(4645) 评论(0) 推荐(2) 编辑
摘要: 首先我们来看一下错误信息:Error Domain=AFNetworkingErrorDomain Code=-1011 "Expected status code in (200-299), got 406"{ status code: 406,headers { "Content-Languag... 阅读全文
posted @ 2014-09-27 13:49 徐明清 阅读(3235) 评论(0) 推荐(1) 编辑
摘要: 1. numberOfComponents:返回UIPickerView当前的列数NSInteger num = _pickerView.numberOfComponents;NSLog( @"%d", num);2. - (NSInteger)numberOfRowsInComponent:(NS... 阅读全文
posted @ 2014-09-17 14:51 徐明清 阅读(1047) 评论(0) 推荐(0) 编辑
摘要: 1.+(BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType; // 检查指定源是否在设备上可用。[UIImagePickerController isSourceTypeAvailable:UIIm... 阅读全文
posted @ 2014-09-16 14:44 徐明清 阅读(812) 评论(0) 推荐(0) 编辑
摘要: 1.Locale设置DatePicker的地区,即设置DatePicker显示的语言。1.跟踪所有可用的地区,取出想要的地区NSLog(@"%@", [NSLocale availableLocaleIdentifiers]);2. 设置日期选择控件的地区[datePicker setLocale:... 阅读全文
posted @ 2014-09-16 14:16 徐明清 阅读(5206) 评论(0) 推荐(1) 编辑
摘要: 在iOS开发线程操作时,一般方法名决定是否开启新线程(async,sync),队列类型(全局队列,串行队列)决定开启多少条线程1.快速线程调用*开启后台线程执行任务[self performSelectorInBackground:@selector(test) withObject:nil];*回... 阅读全文
posted @ 2014-07-12 15:16 徐明清 阅读(558) 评论(0) 推荐(1) 编辑
摘要: 文本属性Attributes1.NSKernAttributeName: @10 调整字句 kerning 字句调整2.NSFontAttributeName : [UIFont systemFontOfSize:_fontSize] 设置字体3.NSForegroundColorAttribute... 阅读全文
posted @ 2013-12-29 18:34 徐明清 阅读(2785) 评论(0) 推荐(1) 编辑
摘要: UIScrollView1. contentOffset默认CGPointZero,用来设置scrollView的滚动偏移量。 // 设置scrollView的滚动偏移量 scrollView.contentOffset = CGPointMake(0, 200);2. contentSize默认CGSizeZero,用来设置scrollView的滚动范围。 // 设置scrollView的滚动范围 scrollView.contentSize = CGSizeMake( self.view.bounds.size.width, self.view.bounds.size.height * 2 阅读全文
posted @ 2013-12-24 19:06 徐明清 阅读(3969) 评论(1) 推荐(1) 编辑
摘要: UITableViewUITableView内置了两种样式:UITableViewStylePlain,UITableViewStyleGrouped里的方法:tableView处理步骤1.有多少组- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView2.第section组头部控件有多高- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section3.第section组有多少行- (NSInteger)t 阅读全文
posted @ 2013-12-22 15:51 徐明清 阅读(3225) 评论(0) 推荐(2) 编辑