New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any option to mount the tableview to a UIView? #17
Comments
I think an easier way to do this is to embed the class ParentViewController: UIViewController {
private lazy var childViewController: QuickTableViewController = QuickTableViewController()
override func viewDidLoad() {
super.viewDidLoad()
childViewController.tableView.frame = // set the frame to a specific spot
view.addSubview(childViewController.tableView)
// Other container view controller management, such as:
// addChildViewController(childViewController)
// childViewController.didMove(toParentViewController: self)
}
} |
This should work. Thanks. |
Thanks for your feedback. Do you have any thoughts on how this API would look like? |
What do you think about something like this override func viewDidLoad() {
super.viewDidLoad()
self.parentView = uiView
self.setupTableView()
} I am doing something quite similar. And it's quite easy to reason about. The only change would just be moving the setup logic out of |
This is also a nice way to achieve what you need. The class YourViewControlller: QuickTableViewController {
override func viewDidLoad() {
super.viewDidLoad()
// the tableView is a subview of self.view
tableView.frame = // a specific spot
}
} |
I can try this out. As a beginner hacking things together, I am using a storyboard. That's why the view way is easy for me. |
@bcylin that works great. Thanks! |
If I want to place the table view at a specific spot, how can I do that?
I currently kinda just hack it by adding a
parentView
open var inQuickTableViewController
. Then I have the option to set theparentView
.Does this library already provide a way to do it that I just didn't know?
The text was updated successfully, but these errors were encountered: