0

Yesterday, I have a problem with CGRectMake, which I already posted here: CGRectMake is not working with UIView

It is caused by having Auto Layout enabled in my project, so I have disabled it. Case closed...but today, when I run my project on the 3.5 inch simulator I have a new problem - all of my textfield, buttons, etc. seems like a mess.

Everything has no proper space between them, unlike when I had Auto Layout enabled. Here's what it looks like:

enter image description here

Is this the consequences of not enabling Auto Layout? If so, what should I do to make constant space between textfield, space of label to navbar, etc?

4

1 回答 1

3

使用自动布局没有什么我无法完成的。在我看来,如果你不使用它,你会发疯的。

我认为您的问题的根源在于,在建议您禁用自动布局的问题中,它可以通过另一种方式修复:在视图控制器的 viewDidLayoutSubviews 中添加任何视图操作代码(调整大小等)。

于 2013-09-18T12:47:59.263 回答