iphone xcode Landscape mode by default

前端 未结 2 1075
温柔的废话
温柔的废话 2021-01-21 14:04

how can I set an iphone app to start in Landscape mode? and stays that way

2条回答
  •  野性不改
    2021-01-21 14:54

    Set the "Initial interface orientation" app.plist entry to "Landscape" (left or right home button) and add (or more likely, uncomment and edit) the following view controller method:

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
        // Return YES for supported orientations
        return UIInterfaceOrientationIsLandscape(interfaceOrientation);
    }
    

提交回复
热议问题