iOS Autolayout : Dynamically adjust controls

江枫思渺然 提交于 2019-12-25 03:08:49

问题


I am practicing autolayout, I have struck on some issue, My layout is like

== Username TextField ==
== Password Textfield ==
==Login Button ==

But when user enters wrong username or password it should be changed to

== Username TextField ==
== Password Textfield ==
== Verification Textfield == 
==Login Button ==

I know how to achieve it by setting frames but I want to do it by autolayout and constrains So I need your help to do it. And it would be great if I can do it using storyboard without writing single line of code

Thanks in advance


回答1:


The desire layout is simple and possible to get done with the help of autolayout but you question is not specific about any problem but in general so i would suggest take a look here a great tutorials about autolayout http://www.raywenderlich.com/50317/beginning-auto-layout-tutorial-in-ios-7-part-1 and try to understand the basic concept, and if you have any specific trouble then you are welcome



来源:https://stackoverflow.com/questions/20876664/ios-autolayout-dynamically-adjust-controls

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!