ios - Where to set and layout a TableView footer -
I am trying to add a footer to my table view. The problem I have is:
If I set the footer in Instead I set the footer in the I can not calculate the frame in the I can create and layout the footer in Just create them in viewWillLayoutSubviews , then due to this it will be called
viewWillLayoutSubviews and we will call an infinite loop .
viewDidLoad and calculate it and its subviews frame in
viewWillLayoutSubviews , the footer at the top Ends my first part of the table view is covered.
viewDidLoad because the table view limit is not correct (My app only supports landscape mode).
viewWillLayoutSubviews by using a Boolean instance variable, but only when it is called for the first time, but it seems incorrect Then the frames will not be counted again. There should be a better way.
viewDidLoad and assign
tableViewHeader and
tableViewFooter properties, in that way the tableview will handle their position.
Comments
Post a Comment