How to use UITableView inside UIScrollView and receive a cell click?

前端 未结 6 2338
野趣味
野趣味 2020-12-01 15:43

I have DiscountListTableViewController that is shown as a separate screen in my app. But there\'s another screen (PlaceDetailsViewController) where

6条回答
  •  情歌与酒
    2020-12-01 16:02

    should not do this because UITableView is a subclass of UIScrollView and according to apple docs. just use auto layout more easier than you calculate every item size and stoping table scroll to do so.

    apple Docs:

    You should not embed UIWebView or UITableView objects in UIScrollView objects. If you do so, unexpected behavior can result because touch events for the two objects can be mixed up and wrongly handled.

提交回复
热议问题