UIModalTransitionStylePartialCurl half page

后端 未结 4 1353
陌清茗
陌清茗 2021-01-13 12:15

I\'m displaying an UIViewController by the following way:


MyViewController *myVc = [[MyViewController alloc] initWithNibName:@\"MyViewController\" bundle:ni         


        
4条回答
  •  一向
    一向 (楼主)
    2021-01-13 12:41

    I believe the posters here and in related threads are having problems because they are trying to decorate the background of the underlying view using another view, such as an image view. The correct way to set a background - and which will not affect the page curl, is to actually set the background.

    - (void)viewDidLoad {
        [super viewDidLoad];
    
        //BG
        self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"StitchTileBG.png"]];
    }
    

    Leave using views and such for actual user interface elements

提交回复
热议问题