iOS. table嵌套WKWebView 主动布局 革新闪烁标题

程序员 2024-10-6 07:10:29 75 0 来自 中国
先说下我这碰到的情况,
tableView 革新时间闪动、大概定位堕落
1.1、tablwView预设高度 主动布局
self.tableView.estimatedRowHeight = 200;
self.tableView.rowHeight = UITableViewAutomaticDimension;
self.tableView.estimatedSectionHeaderHeight = 0
self.tableView.estimatedSectionFooterHeight = 0
1.2 界说cell的高度
@property (nonatomic, assign) CGFloat webHeigh;
1.3 webView地点的cell的高度盘算

1.png 1.4 cell中webView渲染数据后重新获取高度,并革新tableView

1.5 革新:

3.png 最紧张的webView的署理别忘了设置:
_webView.navigationDelegate = self;
您需要登录后才可以回帖 登录 | 立即注册

Powered by CangBaoKu v1.0 小黑屋藏宝库It社区( 冀ICP备14008649号 )

GMT+8, 2024-10-18 16:49, Processed in 0.156282 second(s), 35 queries.© 2003-2025 cbk Team.

快速回复 返回顶部 返回列表