x軸をタイトルヘッダーセクションに素早く変更する方法はありますか?私はそのコードを使用してそれを変更することはできませんよフレームをタイトルヘッダー(UITableView)に変更する方法
:
func tableView(tableView: UITableView, willDisplayHeaderView view: UIView, forSection section: Int)
{
let header:UITableViewHeaderFooterView = view as! UITableViewHeaderFooterView
header.textLabel!.textColor = UIColor.darkGrayColor()
header.textLabel!.font = UIFont(name: "Arial", size: 12.0)!
header.textLabel!.textAlignment = NSTextAlignment.Left
header.backgroundView?.backgroundColor = UIColor.sectionGray()
//Not working
header.textLabel!.frame.origin.x = header.textLabel!.frame.origin.x - 60
}
なぜ 'viewForHeaderInSection'メソッドを使わないのですか? –
フレームを変更する代わりに、トランスレートを使用してラベルを変換します。 – Adeel