cityingMa

2016年2月5日

在UITableViewStylePlain情况下sectionHeader可以与tableview一起滑动的解决方法

摘要: -(void)scrollViewDidScroll:(UIScrollView *)scrollView { CGFloat sectionHeaderHeight = 20; if (scrollView.contentOffset.y <= sectionHeaderHeight&&scrol 阅读全文

posted @ 2016-02-05 14:47 cityingMa 阅读(473) 评论(0) 推荐(0) 编辑

2016年2月3日

autoresizingMask的用法

摘要: UIViewAutoresizingNone = 0, UIViewAutoresizingFlexibleLeftMargin = 1 << 0, UIViewAutoresizingFlexibleWidth = 1 << 1, UIViewAutoresizingFlexibleRightMa 阅读全文

posted @ 2016-02-03 17:30 cityingMa 阅读(228) 评论(0) 推荐(0) 编辑

2016年2月2日

UIWebView加载页面

摘要: 在页面中 加载了一个webView 当点击该webView的页面 需要获取webView中的url。 在push出来的另一个页面中,重新初始化一个webView加载 下面这个方法 在webView加载的时候都会调用 loaded是一个BOOL类型的属性 未设初始值 - (BOOL)webView:( 阅读全文

posted @ 2016-02-02 17:23 cityingMa 阅读(520) 评论(0) 推荐(0) 编辑

2016年1月12日

通过indexPath找到对应的cell

摘要: 在- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath这个方法中通过indexPath找到对应的cell,可以用UITableViewCell*cell = [table... 阅读全文

posted @ 2016-01-12 12:32 cityingMa 阅读(712) 评论(0) 推荐(1) 编辑

2015年11月6日

NSDate获取当前时间,并且转化为需要的格式

摘要: 1 NSDate *date = [NSDate date];2 NSDateFormatter *formatter = [[NSDateFormatter alloc]init];3 [formatter setDateFormat:@"yyyy年MM月dd日 hh时mm分ss秒... 阅读全文

posted @ 2015-11-06 00:26 cityingMa 阅读(359) 评论(0) 推荐(0) 编辑

2015年11月3日

画虚线

摘要: 1 + (void)drawDashLine:(UIView *)lineView lineLength:(int)lineLength lineSpacing:(int)lineSpacing lineColor:(UIColor *)lineColor 2 { 3 CAShapeLay... 阅读全文

posted @ 2015-11-03 22:59 cityingMa 阅读(467) 评论(0) 推荐(1) 编辑

2015年10月29日

断点下载

摘要: 1 @interface ViewController () 2 { 3 // 文件的总大小 4 long long _total; 5 // 当前下载 6 long long _current; 7 } 8 9 // 文件句柄10 @property (nona... 阅读全文

posted @ 2015-10-29 11:46 cityingMa 阅读(351) 评论(1) 推荐(0) 编辑

2015年10月23日

根据显示的字符多少来做Label的自适应高度

摘要: 根据显示的字符多少来做Label的自适应高度1 UILabel *label = [[UILabel alloc]init];2 NSString *string = @"其实,经年过往,每个人何尝不是在这场虚妄里跋涉?在真实的笑里哭着,在真实的哭里笑着,一笺烟雨,半帘幽梦,许多时候,我们不... 阅读全文

posted @ 2015-10-23 13:57 cityingMa 阅读(429) 评论(0) 推荐(0) 编辑

2015年10月21日

iOS中POST异步请求

摘要: POST异步请求(代理)1、遵循@interface ViewController ()2、NSMutableData类型的reData属性是用来拼接数据的@property (nonatomic,strong)NSMutableData *reDtata;3、获取url NSString *url... 阅读全文

posted @ 2015-10-21 15:35 cityingMa 阅读(369) 评论(0) 推荐(0) 编辑

2015年10月17日

iOS中两个APP之间的跳转和通信

摘要: app间的跳转一:在第一个app首先要做下面这些操作;1、在info.plist文件中的Information Property List下添加一项:URL types。2、点开URL types下的item 0,再点开item 0,将item 0下的URL identifier改为URL Sche... 阅读全文

posted @ 2015-10-17 18:02 cityingMa 阅读(681) 评论(4) 推荐(0) 编辑

导航