1
내가 정의 세포 PVIssueTypeSectionHeaderCell
을 만들 UITableViewHeaderFooterView.ContentView 서브 뷰에 사용자 정의 셀 너비를 자동으로 크기를 조정하고이 코드와 헤더보기에 ContentView
에 대한 하위 뷰로 추가 :아이폰 OS
public override UIView GetViewForHeader(UITableView tableView, nint section)
{
var cell = (PVIssueTypeSectionHeaderCell)tableView.DequeueReusableCell(HeaderCellKey);
if(cell == null)
{
cell = PVIssueTypeSectionHeaderCell.Create();
}
cell.ViewModel = this.GroupedIssueTypesFilter.ElementAt((int)section);
var headerView = tableView.DequeueReusableHeaderFooterView(HeaderFooterViewKey);
if (headerView == null)
{
headerView = new UITableViewHeaderFooterView(HeaderFooterViewKey);
}
headerView.ContentView.AddSubview(cell);
return headerView;
}
그러나 정의 셀의 폭 않습니다 아래 이미지에서 볼 수 있듯이 자동 크기 조정이 아닙니다.
이 하나가 아이 패드 세로 모드에있는 동안 :
어떻게 만드는
이
은 아이 패드 가로 모드에서 아이폰 세로 모드에 사용자 정의 셀의 너비는 자동으로 조정됩니까?