UILabel *lab=[[UILabel alloc]initWithFrame:self.view.bounds]; //合并 lab.text=[NSString stringWithFormat:@"%@%@",@"coach: ","coache"]; //圆形 lab.layer.co... ...
分类:
移动开发 时间:
2019-05-15 19:15:44
阅读次数:
201
一、NSKeyedArchiver和NSUserDefault的区别 NSUserDefault只能存储基本数据类型,如NSInteger NSString NSArray 但像UIImage就存不进去 将各种类型的对象存储到文件中,而不仅仅是字符串、数组和字典类型,有一种更灵活的方法。就是利用NS ...
分类:
其他好文 时间:
2019-04-27 17:03:17
阅读次数:
147
我们经常有下载文件上的需求 为了安全我们经常需要对文件进行md5校验 那我就来给大家分享一个很方便的获取文件md5值得方法。 首先需要引用系统库文件 #include <CommonCrypto/CommonDigest.h> /** 获取文件的md5值*/ + (NSString *)getFil ...
分类:
移动开发 时间:
2019-04-22 20:56:17
阅读次数:
278
一、常用的路径方法 1.获取AppName.app 目录路径: NSString *path = [[NSBundle mainBundle] bundlePath]; 2.获取Documents目录路径的方法: NSString *documentPath = NSSearchPathForDir ...
分类:
移动开发 时间:
2019-04-22 20:43:43
阅读次数:
196
__attribute__((format())) 这个format有3个参数。 int my(NSString *str,NSString *str1,NSArray*str2,...) __attribute__((format(__NSString__,2,4))); 三个参数告诉编译器,第二 ...
分类:
其他好文 时间:
2019-04-18 17:17:13
阅读次数:
275
扩展了一下 搜索框,能够实现拼音和首字母模糊搜索 基本搜索 [上一篇文章 ](https://www.cnblogs.com/wjw blog/p/10724043.html iOS8之后搜索框的常规实例) "NSString+utility.h" 中有一个方法用来将字符转为拼音字符串 ...
分类:
移动开发 时间:
2019-04-18 00:40:40
阅读次数:
274
写一个 setter 方法用于完成 @property (nonatomic, retain) NSString *name 写一个 setter 方法用于完成 @property (nonatomic, copy) NSString *name 答: // retain - (void)setNa ...
分类:
其他好文 时间:
2019-03-29 17:39:19
阅读次数:
291
参考:https://github.com/Alittlefly/AppLanguageChange 核心: 通过切换 文件的路径修改要读取的资源。 有问题请留言!谢谢 ...
分类:
移动开发 时间:
2019-03-14 13:12:17
阅读次数:
192
oc总结: 类: @interface Person:NSObject{ //成员变量 @protected @private @public } @property(nonatomic,copy)(NSString*)name; -(void)test; +(void)test2; -(void)... ...
分类:
其他好文 时间:
2019-02-23 01:18:12
阅读次数:
169