IOS - UIPageViewController Inferred vs. Size Freeform

I came across this in Xcode 5 "Storyboard Builder" and I really did not understand this idea. When I add a new UIPageViewController to the screen, I can select Size in the attributes from the Simulated Metrics drop-down list. There are several options, but I do not get the difference between the two: Inferred and Freeform . What is the difference between the two? I understand that there is no difference, because both open Controller for any size the program talks about.

Can anyone explain this to me?

+6
source share
2 answers

What is important to understand in Simulated Metrics is that they: are simulated.

Simulated metrics allow you to customize some things about how an item is displayed in a storyboard. The most common cause of confusion regarding simulated metrics is usually the tab bar, navigation bar, or status bar. You can use simulated metrics to show / hide them in the storyboard. Using the output with them, the context will be used to determine whether he will think that this view will show it based on how you install the previous views and whether it is embedded, etc.

But at the end of the day, when you run your program, does the tab bar show, based on what you did in the code, and will never have anything to do with simulated metrics.

The same is true for EVERY simulated metric on a storyboard. This is just a means to control the plot preview.

+7
source

Inferred limits the size of the UIPageViewController storyboard to the UIPageViewController sizes of iOS devices (particularly for storyboards). If you choose an arbitrary shape, you can resize the UIPageViewController to your desired size.

For example, I used this to create views containing off-screen content (which will slide during use).

+2
source

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


All Articles