版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_19678579/article/details/82261368
一
1.修改导航栏的底线
通过图片来修改导航栏的黑色底线
-(void)viewWillAppear:(BOOL)animated{
//添加有一张有颜色的图片来改变底线的颜色
[self.navigationController.navigationBar setShadowImage:nil];
[self.navigationController.navigationBar setShadowImage:[UIImage imageWithColor:[UIColor colorWithHexString:@"#D3DCE6"] andSize:CGSizeMake(SCREEN_WIDTH, 0.5)]];
}
-(void)viewWillDisappear:(BOOL)animated{
//添加有一张空白颜色的图片来去除底线
[self.navigationController.navigationBar setShadowImage:[UIImage new]];
}
2. UITaleView 在输入文字计算文字高度并改变cell高度时出现闪动
在创建tableview的时候增加这几句,解决闪动问题
_tableView.estimatedRowHeight = 0;
_tableView.estimatedSectionHeaderHeight = 0;
_tableView.estimatedSectionFooterHeight = 0;