Answer the question
In order to leave comments, you need to log in
How to set up a pop-up subview ( cub file ) on button click, for all iPhone sizes?
How to set up an autolayout for a xib file that appears on the main view, only at the click of a button, for all iPhone sizes? Or so that at least the same size pops up for all screens, but in the middle, of any of the screen sizes.
Answer the question
In order to leave comments, you need to log in
The same size in pixels or in relation to screen dimensions?
UPD. If the popup is in a separate file. Then it will not work to connect its dimensions with the dimensions of the parent view, because nothing is known about the existence of the parent at the time of layout.
Alternatively, you can have the view's init/new call initWithFrame: of a predetermined size.
UPD2. Found two interesting methods:
willMoveToSuperview:
didMoveToSuperview
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question