Setting frame for UIButton ignored

103 views Asked by At

I have an iOS 8 application which is using AutoLayout for some involved views. However, the main view has a lot of programmatically created views which take too long to arrange using Auto Layout. I want to manage the layout of those views myself.

Inside that view are some buttons. When I try to set the frame of the button, it is ignored - the frame remains unchanged after the command, even when stepping through it in the debugger. I've set translatesAutoresizingMaskIntoConstraints to true and false, no difference (for this particular problem), and I've deleted all constraints on this button and the view above it (both before execution and in code just before doing layout, in desperation).

1

There are 1 answers

0
Hemanathan On

Creating & managing constraints programatically is tough to trace. Anyhow , try to use storyboard directly - this is the best way to manage constrants easily.