自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(14)
  • 资源 (1)
  • 收藏
  • 关注

原创 点击空白处收起键盘

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{    [self.view endEditing:YES];}

2015-11-25 12:35:41 432

转载 调整行间距

NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc]init];        [paragraphStyle setLineSpacing:8];                [AttributedStr addAttribute:NSParagraphStyleAttributeNam

2015-11-25 12:35:08 1266

转载 添加删除线

NSString *oldPrice = @"¥ 12345";  NSUInteger length = [oldPrice length];    NSMutableAttributedString *attri = [[NSMutableAttributedString alloc] initWithString:oldPrice];  [attri addAttribute:NSStrik

2015-11-25 12:34:31 580

转载 CWStarRateView属性

+@property (nonatomic, assign) CGFloat scorePercent;//得分值,范围为0--1,默认为1 +@property (nonatomic, assign) BOOL hasAnimation;//是否允许动画,默认为NO +@property (nonatomic, assign) BOOL allowIncompleteStar;//评分时是否允许

2015-11-25 12:33:49 1272

转载 显示隐藏文件

defaults write com.apple.finder AppleShowAllFiles -bool true

2015-11-25 12:33:05 312

转载 UITableView相关

//以前在使用UITableView的时候, 总是在cell上自己加Label, 遇到cell的accessoryType不同的时候, 需要自己调整Label的大小和位置. 后来发现 UITableViewCell中有textLabel和detailTextLabel可以使用, 系统配置好了大小位置, 可以根据cell的不同Style和大小自动调整.//textLabel就是放置在cell左边

2015-11-25 12:30:57 232

原创 TABBAR选中后字体颜色

// 字体颜色 选中    [[UITabBarItem appearance] setTitleTextAttributes:@{NSFontAttributeName : [UIFont fontWithName:@"HelveticaNeue-Bold" size:12.0F], NSForegroundColorAttributeName : TAB_BAR_COLOR} forSta

2015-11-25 12:29:38 763

原创 父文本的使用

UILabel *testLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 100, 320, 30)];   testLabel.backgroundColor = [UIColor lightGrayColor];   testLabel.textAlignment = NSTextAlignmentCenter;

2015-11-25 12:28:58 245

转载 基本的ARC使用规则

代码中不能使用retain, release, retain, autorelease不重载dealloc(如果是释放对象内存以外的处理,是可以重载该函数的,但是不能调用[super dealloc])不能使用NSAllocateObject, NSDeallocateObject不能在C结构体中使用对象指针id与void *间的如果cast时需要用特定的方法(__bridge关键字)不能使用NS

2015-11-25 12:28:20 409

转载 UITableViewCell中的使用cell和cell.contentView的区别

一般我们向cell中添加子视图,有两种方式1、[cell addSubview:]2、[cell.contentView addSubview:]    区别在于进行cell编辑时,比如cell内容向左移或者右移时,第一种方式子视图不会移动,第二可以,所以这种情况一般使用

2015-11-25 12:27:49 211

原创 创建通知

//创建通知                NSNotification *notification =[NSNotification notificationWithName:@"tongzhi" object:nil userInfo:nil];                //通过通知中心发送通知                [[NSNotificationCenter de

2015-11-25 12:25:05 227

原创 按钮倒计时

if (btn.tag ==TAG_BTN_IDENTIFIER)    {        NSLog(@"获取验证码");        _btn.enabled =NO;        [_btnsetTitleColor:[UIColorgrayColor] forState:UIControlStateNormal];        _btn.layer

2015-11-25 12:23:43 353

转载 实现Cell的滑动删除

实现Cell的滑动删除, 需要实现UITableView的代理UITableViewDelegate中如下方法: //先要设Cell可编辑- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath{return YES;} //定义编辑样式-

2015-11-25 12:23:02 240

原创 pop 传值

PersonalInformationVC *controller = [self.navigationController.viewControllers objectAtIndex:self.navigationController.viewControllers.count-2];    [self.navigationController popToViewController:con

2015-11-25 12:22:20 255

ios13.0 真机调试包

亲测支持ios13.0public beta版真机调试

2019-06-25

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除