A UITableview inherits from a UIScrollview. But, if u want a UITableview within a scrollview the best way to do this is embed it in a UIView and add that as a subview to a scrollview.
Is the above correct?
If yes, then UIScrollView inherits from UIView.So finally, when all three are put in the same space how do you know which is calling a particular method.
This is a suddenly-confused-newbie question. So , thanks for your patience! 😛
A UITableview inherits from a UIScrollview. But, if u want a UITableview within a
Share
Both
UITableViewandUIScrollViewinherit fromUIView. That’s not the point. UITableView andUIScrollViewas well asUIVieware all components. Think of them as building bricks. By them selves they are nothing more but peaces from which you build your application. If you want them to work together and perform tasks you should design and implement controllers (UIViewControllers or UITableViewControllers) that would know how to manage each and every “bricks”.In terms of using and
UITableViewin theUIScrollView.Case 1.
UITableViewneeds to be scrollable.If that’s the case then you will have a problem, b/c both
UIScrollViewandUITableViewrespond to swipe events, and you will get a collision, and unexpected behavior when scrolling.Case 2.
UITableViewdoes not need to be scrollable.In this case you should disable scrolling for your UITable and it will work fine.
Generally you can combine “UI elements” such as
UITableViews,UIScrollViewsandUIViewshowever you like. But you need to be able to control them throughUIViewControllers.