为什么我在table view cell中添加的按钮不显示 iosUITableviewCelladdSubView 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你给button的title也设置一下color[_button setTitleColor:[UIColor blueColor] forState:UIControlStateNormal]; 直接加载cell上试试,根据我以前遇到的情况,你加在content view上就算显示出来也执行不了click方法 UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(5, 10, 80, 20)]; //button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [button setTitle:@"缓存" forState:UIControlStateNormal]; [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; button.backgroundColor = [UIColor grayColor]; button.opaque = YES; button.backgroundColor = [UIColor redColor]; [cell.contentView addSubview:button]; 如何实现背景动画效果 每个section中返回不同的行,请教指点 播放MP4的奇怪问题 求教。关于在AppDelegate中使用UITabBarController的问题 如何实现textfield控件的移动 ios 不规则截图 寻找iphone界面开发代码 新人求助,自定义slider,加了图片后滑到右边大概80%就整条变图片了 ipad 升级到ios8 GameCenter 没有沙盒模式, 怎么破 我是自定义tabbar(button),如何判断是否已经登录,push到登录页面 iphone 密码锁屏的情况下 后台数据库访问失败 Button的触摸方法不用返回IBAction该怎么理解?
[_button setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
//button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button setTitle:@"缓存" forState:UIControlStateNormal];
[button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
button.backgroundColor = [UIColor grayColor];
button.opaque = YES;
button.backgroundColor = [UIColor redColor];
[cell.contentView addSubview:button];