iPhone Modal View Smaller that the screen

后端 未结 5 1047
一生所求
一生所求 2021-01-31 06:23

I\'m trying to do something that shouldn\'t be that complicated, but I can\'t figure it out. I have a UIViewController displaying a UITableView. I want to present a context menu

5条回答
  •  情歌与酒
    2021-01-31 06:54

    I would strongly consider using a navigation controller to slide in your subview instead of overlaying it. This is the expected model and any small benefit you may think you'll get by doing it your own way will be greatly offset by the principle of (least) surprise.

    If you really really have to do it this way, I believe the trick is to add the first table view as a subview of a transparent "holding" view that the view controller maintains. Then add your new sub view as another subview of that.

提交回复
热议问题