forkingdog / forkingdog/UITableView-FDTemplateLayoutCell
UITableViewHeaderFooterView使用UITableView-FDTemplateLayoutCell警告的问题
- Dominant language
- Objective-C
- Stars
- 9.9k
- Forks
- 2k
- PR merge metrics
- No merged PRs in 30d
Description
hello,我的tableview中使用了大量的继承于UITableViewHeaderFooterView的header和footer,在通过- (CGFloat)fd_heightForHeaderFooterViewWithIdentifier:(NSString *)identifier configuration:(void (^)(id))configuration(这个方法有bug,最新的版本上还没有修复,在该方法的第二行内加上configuration(templateHeaderFooterView);)获取headerview的高度。在headerview中我将创建的UI控件添加到了self.contentView中,但是会提示许多警告,如下
2017-08-21 18:55:29.472933+0800 TableViewProject[21176:566087] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"",
""
)
Will attempt to recover by breaking constraint
如果我不是用self.contentview,而是使用self的话,那么Masonry会提示警告“ [LayoutConstraints] Custom views and layout for UITableViewHeaderFooterView should be contained within the content view. Offending view: >”
附件是demo,使用系统的动态高度没有问题,但是我们需要相下兼容,所以只能来这里求助啦,多谢!!!
[TableViewProject.zip](https://github.com/forkingdog/UITableView-FDTemplateLayoutCell/files/1238579/TableViewProject.zip)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.