Closed stefanvermaas closed 10 years ago
Hi @stefanvermaas ,
So the recommended way to use a UITableView as a subview is using two Screens and adding the TableScreen's view as a subview of the wrapper screen's view. It sounds weird, but that's actually Apple's official way of doing it.
So, here's some basic code.
# appointments.rb
class Appointments < PM::Screen
def on_load
@appointment_list_screen = AppointmentsListScreen.new
self.addChildViewController @appointment_list_screen
content = subview(UIView, :appointment_content) do
appointment_list = subview(@appointment_list_screen.view)
end
# do something with `content` here
end
end
# appointments_list.rb
class AppointmentsListScreen < PM::TableScreen
# do your table stuff here
end
Wonderful! Thanks
You bet!
Hi @jamonholmgren,
I found myself struggling with integrating a custom TableScreen and Teacup into ProMotion. I want to create a view with a subview. That subview must be the PM::TableScreen view.
But I'm not sure how to continue, because how can I use TableScreen from here? How should I alter the UITableView? This is what I thought what was right, but apparently I wasn't :)
Any ideas?
Cheers.