摘要: 将博客搬至CSDN 阅读全文
posted @ 2016-03-25 15:12 Mac-one 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 1.iOS7以后添加的[UIViewController setEdgesForExtendedLayout:]它的默认值为UIRectEdgeAll。当你的容器是navigation controller时,默认的布局将从navigation bar的顶部开始。这就是为什么所有的UI元素都往上漂移... 阅读全文
posted @ 2016-01-09 17:23 Mac-one 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 场景:Person类@interface Person : NSObject@property (nonatomic, copy) NSString *name;@property (nonatomic, copy) NSString *surname;@property (nonatomic, s... 阅读全文
posted @ 2016-01-09 17:17 Mac-one 阅读(248) 评论(0) 推荐(0) 编辑
摘要: - (void)changePage:(UIPageControl *)pageControl{ [_scrollView setContentOffset:CGPointMake(pageControl.currentPage*ScreenWidth, 0) animated:YES];}-... 阅读全文
posted @ 2016-01-09 16:44 Mac-one 阅读(291) 评论(0) 推荐(0) 编辑
摘要: #import "MyLabel.h"#import @implementation MyLabel+(void)setLabel:(UILabel *)custonLabel andContenStr:(NSString *)content andlineSpace:(CGFloat)lineSp... 阅读全文
posted @ 2015-11-14 04:22 Mac-one 阅读(598) 评论(0) 推荐(0) 编辑
摘要: 一直想把即使聊天的界面搭建做个总结 写在博客上,没抽出时间,今天有点时间 先写一部分,估计也不会写太多,会随时更新。 首先确定需求。项目中聊天只涉及到 纯文本、纯图片、语音消息的功能,所以在聊天的界面中会存在这么个消息类型的结构体 当然还要区分消息的发送者和接收者 首先从最基础的界面开始分析。首先聊 阅读全文
posted @ 2015-07-21 18:26 Mac-one 阅读(278) 评论(0) 推荐(0) 编辑
摘要: ios8新增了catory字段 这个字段的标示符identifier必须和后台字段一致。catory是UIMutableUserNotificationCategory这个类 初始化的方法如下 UIMutableUserNotificationCategory *categorys = [[UIMutableUserNotificationCategoryalloc] init]; c... 阅读全文
posted @ 2015-07-21 17:42 Mac-one 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 滑动出现类似iPhone短信出现按钮的效果不啰嗦了 上代码关键方法如下- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath{ return YES;}- (UITabl... 阅读全文
posted @ 2015-07-21 13:48 Mac-one 阅读(637) 评论(0) 推荐(0) 编辑
摘要: 做开发有的时候会遇到服务器返回的数据是html的,我们可以选择直接用webview来加载的方式去处理,当然这个方法不适用所有场景,通常我们会选择把没有必要的html标签去掉留下需要的文字信息,现在一起来看看吧。首先提供一个html标签的字符串 NSString *html = @"劳动是人类创... 阅读全文
posted @ 2015-07-15 00:18 Mac-one 阅读(8939) 评论(1) 推荐(0) 编辑
摘要: 添加代码注释的插件时需更改的UDID获取方法defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUIDNSUrl中存在汉字的解决办法是:urlStr = [urlStr stringByAddingPe... 阅读全文
posted @ 2015-07-14 09:37 Mac-one 阅读(148) 评论(0) 推荐(0) 编辑