20170308: 设置点击UITableCell颜色不改变 && const

主题 : 设置点击UITableCell颜色不改变

把单元格点击时状态 改为None

 

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;

这个代理中   加上一句 

cell.selectionStyle = UITableViewCellSelectionStyleNone;





const 定义警告 Sending 'const NSString *__strong' to parameter of type 'NSString * _Nullable'...

const NSString * STOP_PRINT = @"停止打印";

在使用的地方出现警告

[objc] view plain copy 在CODE上查看代码片派生到我的代码片

[barItem setTitle:STOP_PRINT];
Sending 'const NSString *__strong' to parameter of type'NSString * _Nullable' discards qualifiers

讲const的位置放在*后面即可
[objc] view plain copy 在CODE上查看代码片派生到我的代码片

static NSString * const STOP_PRINT = @"停止打印"; 

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容