自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 补全默认Tableview的cell分割线最前面15的空缺

//实现下面的代理方法即可-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {        if ([cellrespondsToSelector:@selector

2016-09-13 14:26:24 799

原创 [ios]TableView的Cell中有Textfield时放置键盘遮挡输入框

tableview初始化时- (UITableView *)tableView { if (!_tableView) { UITableViewController* tvc=[[UITableViewController alloc] initWithStyle:UITableViewStylePlain]; [self addChildViewContr

2016-08-11 10:39:12 3149

原创 mac的finder崩溃重启指令

终端下输入  killall -KILL Finder

2016-08-05 13:58:48 1960

原创 MAS报错,iOS9.3下不能使用equalTo(self.view)这样的语句

iOS8.4的模拟器下make.left.equalTo(self.view);这样的语句是可以执行的,但在iOS9.3的模拟器就得改为make.left.equalTo(self.view.mas_left);当然也有可能是因为项目里面的mas版本一直没更新的原因。解决方法:统一使用  make.left.equalTo(self.vi

2016-08-04 17:05:53 468

转载 [iOS]修改UIBarButtonItem文字大小

[self.navigationItem.rightBarButtonItem setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIFont boldSystemFontOfSize:14],NSFontAttributeName, nil] forState:UIControlStateNormal];

2016-07-30 16:50:32 559

转载 iOS - is missing from working copy

1.打开终端2.cd 到警告所提示的文件夹下3.执行命令  svn rm --force 丢失文件(文件夹)的名称4.回车

2016-07-21 18:17:33 236

原创 [ios]移除当前视图下的所有子控件

[self.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];

2016-07-01 15:15:03 1783

原创 [ios]字符串不同位置显示不同颜色

NSString* str=@“颜色分段显示”;    NSMutableAttributedString *coloredStr = [[NSMutableAttributedStringalloc] initWithString:str];    [coloredStr addAttribute:NSForegroundColorAttributeNamevalue

2016-05-13 14:10:16 561

原创 UITableView中Cell报错[UITableView _configureCellForDisplay:forIndexPath:]

*** Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3512.30.14/UITableView.m:7962一般是cell的复用出现问题,要在cellForR

2016-05-11 18:12:00 1917

原创 [ios]使用Masonry为自定义view添加约束时,得先把自定义view添加到父视图上

使用Masonry为自定义view添加约束时,得先把自定义view添加到父视图上,否则出现错误代码m:345

2016-04-06 13:44:56 2523

原创 [ios]当前线程暂时休眠

[NSThreadsleepForTimeInterval:0.5];

2016-03-29 13:44:53 1085

原创 [ios]使用代码从当前视图跳转到故事板创建的视图

UIStoryboard *story = [UIStoryboard storyboardWithName:@"填写故事板名称" bundle:nil];SecondViewController *svc = [story instantiateViewControllerWithIdentifier:@"填写ViewController在故事板中设置的identifier"];[self.n

2016-03-24 17:51:14 319

原创 [ios]http无法链接

1、在Info.plist中添加NSAppTransportSecurity类型Dictionary。2、在NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值设为YES

2016-03-23 14:31:28 311

原创 [ios]使用代码进行故事板创建的视图的跳转 ?

UIStoryboard *story = [UIStoryboard storyboardWithName:@"填写故事板名称" bundle:nil];UIViewController *vc = [story instantiateViewControllerWithIdentifier:@"填写ViewController在故事板中设置的identifier"];[self.navig

2016-03-22 16:14:38 1421

原创 [ios]使用self.view.window.rootViewController presentViewControllert跳转后的返回

[self dismissModalViewControllerAnimated:NO];

2016-03-22 15:39:48 1491

原创 [ios]ScrollView中根据滚动距离来判断当前页数

ScrollView中通过当前滚动的相对距离contentOffset属性除以页面宽度来获取当前页数,主要用于滚动视图时让导航栏按钮或标题同步切换;int page=(int)scrollView.contentOffset.x/kWidth+0.5; UIButton *button=[self.view viewWithTag:page+100]; [button setSel

2016-03-18 15:43:10 2561

空空如也

空空如也

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

TA关注的人

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