私はグループ化されたテーブルビューを持つビューコントローラを持っています。これにより、非常に奇妙なグリッチが生成され、セクションのタイトルが横に表示されます。私はテーブルビューのスーパービューにトップ、トレーリング、ボトム、リーディングの制約を付けました。cellForRowAtIndexPathでUITableViewCell()を返してテストしましたが、問題の原因となっていたセルであるかどうかを確認しましたが、 。時間後UITableViewセクションタイトルGlitch?
var sectionTitles = ["Customer Orders", "Unprocessed Orders", "Processed Orders"]
func numberOfSectionsInTableView(tableView: UITableView) -> Int {
return sectionTitles.count
}
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func sectionIndexTitlesForTableView(tableView: UITableView) -> [String]? {
return sectionTitles
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell{
let cell = tableView.dequeueReusableCellWithIdentifier(CONSTANTS.CELL_IDENTIFIERS.ORDER_CELL) as! OrderTableViewCell
return cell
}
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
// Perform segue to order list in future
}
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
return 117.0
}