@interface HATextView : UITextView @property(nonatomic,copy) NSString *myPlaceholder; //文字 @property(nonatomic,strong) UIColor *myPlaceholderColor; @e ...
分类:
其他好文 时间:
2018-11-06 00:48:24
阅读次数:
180
如何给button增加下划线简单版 - (void)setUnderLineForButton:(UIButton *)btn withTitle:(NSString *)title { //利用富文本的方式增加button下划线 NSMutableAttributedString*str = [[ ...
分类:
其他好文 时间:
2018-11-01 16:11:42
阅读次数:
146
NSString * str = @"123/21年123" NSCharacterSet *nonDigitCharacterSet = [[NSCharacterSet decimalDigitCharacterSet] invertedSet]; //获取字符串中的数字 str = [[str ...
分类:
移动开发 时间:
2018-10-31 18:26:51
阅读次数:
360
1,substringFromIndex 从索引0开发到到index的后面的字符 2,substringWithRange 取指定range里面的字符,左边为索引index,右边为截取的范围 3,substringToIndex 从索引0到给定的索引index 代码如下: ...
分类:
移动开发 时间:
2018-10-29 12:56:05
阅读次数:
230
#pragma mark 动态图生成 -(UIImage *)getAnimatedGIFWithData:(NSString *)path { NSData *data = [NSData dataWithContentsOfFile:path]; if (!data) { return nil;... ...
分类:
其他好文 时间:
2018-10-22 20:15:04
阅读次数:
414
// 获取ios设备信息 - (void)viewDidLoad { NSString *content=[[NSString alloc] initWithFormat: @"unique id: %@ \nlocalized model: %@ \nsystem version: %@ \nsy ...
分类:
移动开发 时间:
2018-10-09 11:42:23
阅读次数:
223
YYModel源码中有一句:kCFNull nil: define the id of a null instance, 指向一个(实例)对象的空指针 如:NSString *str = nil; NSDate *date = nil; Nil:defines the id of a null cl ...
分类:
其他好文 时间:
2018-10-09 00:44:01
阅读次数:
178
Appium 支持以下语言的客户端类库: 锁定注意,一些方法类似 endTestCoverage() 目前并不能完全支持。当这个问题被解决后,覆盖率支持才会被添加。如果你仍然想使用这些方法,请参考 GitHub 上关于 bindings 的文档。 锁定屏幕。 # ruby lock 5 # pyth ...
分类:
移动开发 时间:
2018-09-30 20:08:10
阅读次数:
197
性能优化之NSDateFormatter 为什么要优化NSDateFormatter? 首先,过度的创建NSDateFormatter用于NSDate与NSString之间转换,会导致App卡顿,打开Profile工具查一下性能,你会发现这种操作占CPU比例是非常高的。据官方说法,创建NSDateF ...
分类:
其他好文 时间:
2018-09-28 12:57:30
阅读次数:
160
在开发iOS程序时,有时候需要将时间格式调整成自己希望的格式,这个时候我们可以用NSDateFormatter类来处理。下面来介绍NSDateFormatter的常用属性和API; 1.常用属性 @property (null_resettable, copy) NSString *dateForm ...
分类:
其他好文 时间:
2018-09-28 12:46:49
阅读次数:
223