General view of the UISplitViewController

Is it possible to have a general view for both the main and the detailed presentation of the controllers.

What if I need to add a header image (at the top, the very first view), common to both the main and the detailed view of the controllers. When the device is in portrait mode, the width of the image of the header image should be reduced to match the view of the detailed view manager, and when the orientation changes to landscape, the width of the same header image should expand, which is the width it should be 1024. Please tell me , is it possible. or any workaround for this?

+4
source share
2 answers

I'm not sure about this, but you may need to explicitly set the image using UIImageView in your DetailViewController and in your RootViewController account. Then, when changing the orientation (Portrait → Landscape), the UIImageView in the DetailViewController should automatically flip along with the rest of the ViewController, giving you what you are looking for.

0
source

Your application must have a splitViewController. If you add the splitViewController view as a subview of some other kind of viewController, splitViewController will not receive rotation events.

For your problem, change the design of your application so that the general view appears only in the detailViewController part, so that it also displays in portrait mode.

If this is not possible, the only option you are left with is to create your own splitViewController so that you can add it on top of some other views and send rotation events to this splitViewController when the rotation occurs.

0
source

Source: https://habr.com/ru/post/1306224/


All Articles