上一页 1 ··· 3 4 5 6 7 8 9 下一页
摘要: AES加密(oc实现) 文件: import import @interface NSData(Encryption) (NSData )AES256EncryptWithKey:(NSString )key; //加密 (NSData )AES256DecryptWithKey:(NSString 阅读全文
posted @ 2016-03-03 11:28 孙焱焱 阅读(1962) 评论(0) 推荐(0) 编辑
摘要: 常用排序(oc实现) 冒泡排序 //由小到大 排序 //NSNumber 中用的int类型 +(void)BubbleSort:(NSMutableArray )arr { NSLog(@" 冒泡排序前 :%@ ",arr); for (int i = 0; i < arr.count; i++) 阅读全文
posted @ 2016-03-03 11:19 孙焱焱 阅读(416) 评论(0) 推荐(0) 编辑
摘要: 单例模式(arc) @interface Singleton : NSObject + (Singleton )sharedInstance; @end __strong static Singleton singleton = nil; @implementation Singleton // 这 阅读全文
posted @ 2016-02-29 11:16 孙焱焱 阅读(191) 评论(0) 推荐(0) 编辑
摘要: NSData 转 md5 NSData+MD5Digest.h import @interface NSData (MD5Digest) +(NSData )MD5Digest:(NSData )input; (NSData )MD5Digest; +(NSString )MD5HexDigest: 阅读全文
posted @ 2016-02-25 14:13 孙焱焱 阅读(1139) 评论(0) 推荐(0) 编辑
摘要: CoreMotion (加速仪与陀螺仪) 主要是使用 iOS中的主要传感器: @ | 加速度传感器 | 电子罗盘 | 陀螺仪 | 接近传感器 | | | 功能 | 通过测量三个轴的加速度大小来判断人体运动 | 通过测量设备周围地磁场的强度和方向来判断朝向 | 通过测量三个轴的旋转速率来判断朝向 | 阅读全文
posted @ 2016-02-24 17:57 孙焱焱 阅读(6809) 评论(1) 推荐(1) 编辑
摘要: UIImage 绘制 UIGraphicsBeginImageContext 1. UIGraphicsBeginImageContext(CGSize size) 或者 UIGraphicsBeginImageContextWithOptions(CGSize size, BOOL opaque, 阅读全文
posted @ 2016-02-24 13:10 孙焱焱 阅读(3230) 评论(0) 推荐(1) 编辑
摘要: UIViewContentMode 缩放模式 typedef NS_ENUM(NSInteger, UIViewContentMode) { UIViewContentModeScaleToFill, UIViewContentModeScaleAspectFit, // contents scal 阅读全文
posted @ 2016-02-24 12:50 孙焱焱 阅读(421) 评论(0) 推荐(0) 编辑
摘要: 页面一 “红茶” UITableView UITableViewDataSource + UITableVIewDelegate 负责 点击“红茶”等cell的事件 负责 添加删除cell 和你的checkList项目差不多 “加茶” UIButton (UIImageView、UIView也行) 阅读全文
posted @ 2016-02-18 09:28 孙焱焱 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 日期格式字符说明 NSDate now = [NSDate date]; NSDateFormatter df = [[NSDateFormatter alloc]init]; df.dateFormat = @"yyyyMMddHHmmss"; NSString str = [df stringF 阅读全文
posted @ 2016-02-17 18:02 孙焱焱 阅读(1443) 评论(0) 推荐(0) 编辑
摘要: AVPlayer 初始化 + (instancetype)playerWithURL:(NSURL )URL; + (instancetype)playerWithPlayerItem:(AVPlayerItem )item; (instancetype)ini... 阅读全文
posted @ 2016-01-20 18:30 孙焱焱 阅读(2381) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 下一页