会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
柳仙慧子
博客园
首页
新随笔
联系
管理
订阅
上一页
1
2
3
4
5
6
7
8
9
···
14
下一页
2017年4月24日
block的循环引用
摘要: 1、创建block用copy修饰,拷贝到堆上 2、之前一直用这种写法,但会碰到提前释放的状态 __weak typeof(self)wakeself = self; 3、就用弱指针指向self,在block内部对weakSelf产生一个强引用,就解决了提前释放的问题 @weakify(self);
阅读全文
posted @ 2017-04-24 16:25 柳仙慧子
阅读(151)
评论(0)
推荐(0)
2017年4月20日
判断字符串是否为空
摘要: #pragma mark - 判断字符串是否为空 - (BOOL) isBlankString:(NSString *)string { if (string == nil || string == NULL || [string isEqualToString:@"<null>"]) { retu
阅读全文
posted @ 2017-04-20 10:44 柳仙慧子
阅读(142)
评论(0)
推荐(0)
post请求自己写的(直接可用)
摘要: // // 1.设置请求路径 // NSURL *URL=[NSURL URLWithString:@"http://first.go.com/api/user/serves"];//不需要传递参数 // // NSMutableURLRequest *request = [NSMutableURL
阅读全文
posted @ 2017-04-20 10:10 柳仙慧子
阅读(1313)
评论(0)
推荐(0)
2017年4月19日
键盘弹出数字键
摘要: passwordTF.keyboardType = UIKeyboardTypePhonePad;
阅读全文
posted @ 2017-04-19 18:32 柳仙慧子
阅读(150)
评论(0)
推荐(0)
2017年4月7日
button title位置设置
摘要: registBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft; 此时文字会紧贴到做边框,可以设置registBtn.contentEdgeInsets = UIEdgeInsetsMake(0, 10,
阅读全文
posted @ 2017-04-07 14:31 柳仙慧子
阅读(1195)
评论(1)
推荐(0)
2017年4月1日
iOS正则表达式 判断手机号 邮箱 电话 数字 身份证 银行卡
摘要: 转自http://blog.csdn.net/chuan403082010/article/details/51683309 //昵称 + (BOOL) validateNickname:(NSString *)nickname; //姓名一般只允许包含中文或英文字母 + (BOOL)isValid
阅读全文
posted @ 2017-04-01 15:24 柳仙慧子
阅读(453)
评论(0)
推荐(0)
蒙版遮住全屏(包括导航栏)
摘要: UIWindow * window = [UIApplication sharedApplication].windows[0]; UIView *backgroundView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT
阅读全文
posted @ 2017-04-01 11:02 柳仙慧子
阅读(415)
评论(0)
推荐(0)
2017年3月31日
计算字符串长度
摘要: #pragma mark--计算字符串长度 - (CGSize)strsizewithstr:(NSString *)str{ NSDictionary *attributes = @{NSFontAttributeName:[UIFont systemFontOfSize:20]}; CGSize
阅读全文
posted @ 2017-03-31 15:24 柳仙慧子
阅读(150)
评论(0)
推荐(0)
textfield自定义清除按钮
摘要: UIButton *clearButton = [self.textField valueForKey:@"_clearButton"]; [clearButton setImage:[UIImage imageNamed:@"close"] forState:UIControlStateNorma
阅读全文
posted @ 2017-03-31 15:08 柳仙慧子
阅读(489)
评论(0)
推荐(0)
2017年3月30日
ios 判断字符串是否为空
摘要: #define NULLString(string) ((![string isKindOfClass:[NSString class]])||[string isEqualToString:@""] || (string == nil) || [string isEqualToString:@""
阅读全文
posted @ 2017-03-30 13:17 柳仙慧子
阅读(550)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
···
14
下一页
公告