Tuesday, December 10, 2013

How to add other controls UITableViewController

UITableViewController inside a tableview. But I want to customize it, add some buttons such as what should be how to do it?
My current practice is to create a new UIViewController, then put View> TableView + Button this hierarchy in the corresponding nib inside.
But now I want to increase the pull to refresh feature table, ready to have a PullRefreshTableViewController class. This class is inherited from UITableViewController, it can not inherit directly to my viewController, ViewController can rewrite my code.
So what can I do?
Reply:
Add view in tableview, ah, and each cell is a view
Reply:
If the landlord did not understand the meaning of the words just want to add a control
Just a place to write directly to the definition of Cell ah
For example, you want to add a button
Define what button style, frame or something, then [cell addSubView: button]; ok friends ~
Reply:
I do not want to add the cell inside subview, but would like to add another outside tableview uiview
Reply:
reference to the third floor hikui reply:
I do not want to add in the cell inside subview, but would like to add another outside tableview uiview
< / fieldset>

. . . Then added directly ah. . . What is the problem?
Reply:
Then add a direct view of the parent tableview
Reply:
[Self.tableView addsubview: uiview]
If not then add

[Self.view addsubview: UIview]


Reply:
The original is so much noise dropdown update, lz can refer
https://github.com/enormego/EGOTableViewPullRefresh
This method is not inherited from uitableviewcontroller, is also very simple to use, I have been using it. Just recently spent little skill, you can refer to.
http://blog.csdn.net/ugg/article/details/7283661

No comments:

Post a Comment