我使用Interface Builder將自定義行高設置爲88.0,但是當應用程序運行其高度爲10.0時更大。 我試圖用TableView中的自定義單元行高度
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
,但它會產生一個錯誤有時
CALayerInvalidGeometry', reason: 'CALayer bounds contains NaN:...
我沒有條件...我使用返回88.0; 但問題是如何保持我在Interface Builder中填充的自定義行高。 – Shmidt
如果您想要使用在Interface Builder中填充的自定義行高度。爲此,您可以在界面構建器中輸入height並從代碼中移除' - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath'方法。 – MinuMaster