Setting the background color on UITableViewHeaderFooterView has been deprecated. Please use contentV
2017-05-24 17:39
393 查看
提示:
Setting the background color on UITableViewHeaderFooterView has been deprecated. Please use contentView.backgroundColor instead.当时设置tableView组头视图的颜色时写法如下
- (void)tableView:(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section { view.backgroundColor = [UIColor lightGrayColor]; }
这种设置组头视图背景颜色的方法已经被摒弃了
正确写法:
- (void)tableView:(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section { UITableViewHeaderFooterView *headerView=(UITableViewHeaderFooterView *)view; [headerView.backgroundView setBackgroundColor:[UIColor lightGrayColor]]; }
相关文章推荐
- 警告 Setting the background color on UITableViewHeaderFooterView has been deprecated
- Setting the background color and background alpha on a Flex PopUpButton control’s pop up menu
- 【Python】UserWarning: Selenium support for PhantomJS has been deprecated, please use headless version
- has been modified since the precompiled header ,please rebuild precompiled header
- relying on packaging to define the extension of the main artifact has been deprecated and is schedul
- UserWarning: Selenium support for PhantomJS has been deprecated, please use headless versions of Chr
- 打开Eclipse提示“The default workspace “xxxx” is in use or cannot be created Please choose a different on
- iOS 协同开发出fatal error: file 'XX-Prefix.pch' has been modified since the precompiled header was built
- 出现 Assigning the return value of new by reference is deprecated in xxxx &&“Warning: Call-time pass-by-reference has been deprecated”怎么办?
- IOS开发xcode报错之has been modified since the precompiled header was built
- fatal error: file has been modified since the precompiled header
- Warning:The `android.dexOptions.incremental` property is deprecated and it has no effect on the buil
- 奇葩问题:This file could not be checked in because the original version of the file on the server was moved or deleted. A new version of this file has been saved to the server, but your check-in comments were not saved
- How to customize the background color of a UITableViewCell? 修改UITableViewCell背景色
- How to customize the background color of a UITableViewCell?
- [Programming Visual C++]Chapter Six-Setting the Color for the Dialog Background and for Controls
- Warning:The `android.dexOptions.incremental` property is deprecated and it has no effect on the buil
- Change the background color of the header of a List Control
- Warning:The `android.dexOptions.incremental` property is deprecated and it has no effect on the buil
- Creating properties on demand (a.k.a. dynamic properties) has been deprecated and is scheduled to be