- 博客(12)
- 收藏
- 关注
转载 小知识
1.iOS7以后添加的[UIViewController setEdgesForExtendedLayout:]它的默认值为UIRectEdgeAll。当你的容器是navigation controller时,默认的布局将从navigation bar的顶部开始。这就是为什么所有的UI元素都往上漂移了44pt。 self.edgesForExtendedLayout = UIRe...
2016-01-09 17:23:00 72
转载 对NSArray中自定义的对象进行排序
场景:Person类 @interface Person : NSObject @property (nonatomic, copy) NSString *name; @property (nonatomic, copy) NSString *surname; @property (nonatomic, strong) NSDate *dateOfBirth; @end ...
2016-01-09 17:17:00 91
转载 照片浏览滑动效果UIScrollView和UIPageControl组合
- (void)changePage:(UIPageControl *)pageControl{ [_scrollView setContentOffset:CGPointMake(pageControl.currentPage*ScreenWidth, 0) animated:YES]; } - (void)scrollViewDidEndDecelerati...
2016-01-09 16:44:00 87
转载 label 设置行间距 字间距
#import "MyLabel.h" #import <CoreText/CoreText.h> @implementation MyLabel +(void)setLabel:(UILabel *)custonLabel andContenStr:(NSString *)content andlineSpace:(CGFloat)lineSpace andH...
2015-11-14 04:22:00 295
转载 即使通讯聊天界面搭建----iOS
一直想把即使聊天的界面搭建做个总结 写在博客上,没抽出时间,今天有点时间 先写一部分,估计也不会写太多,会随时更新。 首先确定需求。项目中聊天只涉及到 纯文本、纯图片、语音消息的功能,所以在聊天的界面中会存在这么个消息类型的结构体 typedef enum { kImageContent = 0, //代表收到的或者是发出的图片 kAudioConten...
2015-07-21 18:26:00 117
转载 ios8推送新增
ios8新增了catory字段 这个字段的标示符identifier必须和后台字段一致。 catory是 UIMutableUserNotificationCategory这个类 初始化的方法如下 UIMutableUserNotificationCategory *categorys = [[UIMutableUserNotificationCategoryalloc] ini...
2015-07-21 17:42:00 76
转载 UITableviewCell滑动出现多级的控制按钮 - UITableViewRowAction
滑动出现类似iPhone短信出现按钮的效果 不啰嗦了 上代码 关键方法如下 - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { return YES; } - (UITableViewCellEditingStyle)tableVi...
2015-07-21 13:48:00 108
转载 iOS 去掉html标签 留下原本的字符串
做开发有的时候会遇到服务器返回的数据是html的,我们可以选择直接用webview来加载的方式去处理,当然这个方法不适用所有场景,通常我们会选择把没有必要的html标签去掉留下需要的文字信息,现在一起来看看吧。 首先提供一个html标签的字符串 NSString *html = @"<p><span style=\"font-family:宋体\"&...
2015-07-15 00:18:00 97
转载 平时常用的小知识点 (不断更新中)
添加代码注释的插件时需更改的UDID获取方法 defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID NSUrl中存在汉字的解决办法是: urlStr = [urlStr stringByAddingPercentEscapesUsingEncoding:NSU...
2015-07-14 09:37:00 100
转载 百度地图添加大头针和视图
首先初始化一个要展示的泡泡视图 paopaoView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 80)]; paopaoView.layer.cornerRadius = 10; paopaoView.layer.borderColor = [UIColor lightGrayCol...
2015-07-14 09:34:00 132
转载 ios8中修改的 推送和地图
ios8之前 注册通知的方法是 [application registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeSound|UIRemoteNotificationTypeBadge]; ios8 注册这样写 UIUser...
2015-07-10 13:50:00 73
转载 ios 有关设备信息
首先列出几个简单的信息 #pragma makr- app版本 -(NSString *)getVersionCode{ NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; return [infoDictionary objectForKey:@"CFBundleS...
2015-07-10 13:38:00 68
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人