Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS - UIPageViewController size Inferred vs. Freeform [duplicate]

I came across this in XCode 5's "Storyboard Builder" and I didn't really get the idea. When I add a new UIPageViewController to the screen, I can select the Size in the attributes in the Simulated Metrics dropdown. There are a few options, but I don't get the difference between two: Inferred and Freeform. What is the difference between these two? My understanding is that there's no difference, because both open up the Controller to be any size the program tells it to be.

Could someone explain this to me?

like image 896
Jeeter Avatar asked Jun 28 '14 01:06

Jeeter


1 Answers

What's important to understand about Simulated Metrics is that they're just that: simulated.

Simulated Metrics let you adjust some things about how an item appears in the storyboard. The most common cause for confusion regarding simulated metrics is usually tab bars, navigations bars, or status bar. You can use simulated metrics to show/hide these in the storyboard. Using inferred with these will use context to determine whether or not it thinks this view will show it based on how you set previous views and whether or not it's embedded, etc.

But at the end of the day when you run your program, whether or not a tab bar shows is based on what you've done in code and will never have anything to do with the simulated metric.

The same is true for EVERY simulated metric on the storyboard. They're simply means for controlling the storyboard preview of the item only.

like image 162
nhgrif Avatar answered Sep 19 '22 12:09

nhgrif