Re: Autolayout help please


Alex Zavatone
 

Autolayout should have nothing to do with target/action.

Check in your changes and remove all constraints. See what happens then. Then revert and remove 1/2 of your constraints. Lather, rinse, repeat until you have isolated your problem.

Happy New Year.
Alex Zavatone

On Dec 31, 2020, at 11:29 PM, tridiak <tridiaknz@gmail.com> wrote:

Ok. Thanks for help. I look into it.

Using Storyboard.
Note: I have set no constraints.

The bug prevents IBAction from working.

On 1/01/2021, at 9:23 AM, Ben Kennedy <ben-groups@zygoat.ca> wrote:


On 31 Dec 2020, at 7:03 am, davelist via groups.io <davelist=mac.com@groups.io> wrote:

If you're creating the views in code then for each UIView subclass you create, you need to set translatesAutoresizingMaskIntoConstraints to false.
That's only correct if you're setting constraints on them. If you're positioning them old-school, i.e. by expressly setting frame and thus using the autoresizing mask, then this property must remain true (the default).

I don't know what your IBAction is, but I wouldn't think constraints would affect it.
Certainly not; the target/action have nothing to do with layout.

Mark, could you provide us a more comprehensive description of your view layout? A hierarchy diagram might help.

Having said this, it might be a systemic bug to do with the iPad keyboard and/or simulator. Simply googling for "_UIButtonBarButtonItem" brings up a number of results describing a similar problem.

-ben









Join xcode@apple-dev.groups.io to automatically receive all group messages.