iPad custom size of modal view controller

前端 未结 13 2006
挽巷
挽巷 2020-12-07 08:11

I have a couple of modal view controllers of certain size. I\'m trying to avoid the use of custom views (creating full screen black translucent overlay over current view, ad

13条回答
  •  北荒
    北荒 (楼主)
    2020-12-07 09:02

    As some other users here, I also had the problem that the origin of the modal view controller was not correct. After some experiments, I found a solution that worked for me:

    - (void)viewWillLayoutSubviews{
        [super viewWillLayoutSubviews];   
        self.view.superview.bounds = CGRectMake(0, 0, , );
    }
    

提交回复
热议问题