Create and use a subview. There is no significant cost to an additional
content-less view.
--
David Duncan @ My iPhone
> On Nov 30, 2016, at 9:46 AM, Andreas Falkenhahn
> wrote:
>
>> On 29.11.2016 at 22:28 David Duncan wrote:
>>
>> Correct, because the owning
On 29.11.2016 at 22:28 David Duncan wrote:
> Correct, because the owning UIWindow owns the frame of the view
> controller’s view, and may change it at any time.
> The simplest way to fix your specific issue is to just set the
> contentMode to AspectFit. This will automatically center and scale
>
> On Nov 29, 2016, at 2:50 PM, Andreas Falkenhahn
> wrote:
>
> On 29.11.2016 at 17:35 David Duncan wrote:
>
>
>>> On Nov 29, 2016, at 11:30 AM, Andreas Falkenhahn
>>> wrote:
>
>>> On 28.11.2016 at 16:50 David Duncan wrote:
>
I think
On 29.11.2016 at 17:35 David Duncan wrote:
>> On Nov 29, 2016, at 11:30 AM, Andreas Falkenhahn
>> wrote:
>> On 28.11.2016 at 16:50 David Duncan wrote:
>>> I think you can do everything you need to do in layoutSubviews
>>> (fundamentally it doesn’t matter if the device
> On Nov 29, 2016, at 11:30 AM, Andreas Falkenhahn
> wrote:
>
> On 28.11.2016 at 16:50 David Duncan wrote:
>
>> I think you can do everything you need to do in layoutSubviews
>> (fundamentally it doesn’t matter if the device rotates or not, you
>> just want to keep the
On 28.11.2016 at 16:50 David Duncan wrote:
> I think you can do everything you need to do in layoutSubviews
> (fundamentally it doesn’t matter if the device rotates or not, you
> just want to keep the view centered in its superview).
Right, makes sense.
> In general you should do as much as
> On Nov 27, 2016, at 7:25 AM, Andreas Falkenhahn
> wrote:
>
> On 27.11.2016 at 00:04 David Duncan wrote:
>
>> What are you trying to accomplish?
>
> I want to keep my UIView centered on the screen so I need to
> change its position when the device rotates. I'm
On 27.11.2016 at 00:04 David Duncan wrote:
> What are you trying to accomplish?
I want to keep my UIView centered on the screen so I need to
change its position when the device rotates. I'm currently
moving the UIView to the new position using
[myView setFrame:...];
in
What are you trying to accomplish?
For most developers just looking at the aspect ratio in viewDidLayoutSubviews
is sufficient. If you only want to do something for rotating, doing it as an
alongside animation in viewWillTransitionToSize is usually what you want.
Also from your last thread, if
When the user rotates the device, I need to reposition my view.
I do this in viewDidLayoutSubview(). iOS then smoothly rotates
the view to the new position.
However, in order to reposition my view in viewDidLayoutSubview()
I need to know whether viewDidLayoutSubview() is called because
the user
10 matches
Mail list logo