iOS的自动布局:动态调整控制 [英] iOS Autolayout : Dynamically adjust controls

查看:276
本文介绍了iOS的自动布局:动态调整控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在练自动布局,我已经达成了一些问题,我的布局是像

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 ==

我知道如何通过设置帧来实现它,但我想通过自动布局和约束去做
所以,我需要你的帮助做到这一点。这将是巨大的,如果我可以用故事板做它无需编写code单线

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

在此先感谢

推荐答案

的愿望布局很简单,可能得到与自动布局的帮助下完成的,但你的问题没有具体说明任何问题,但总的来说,所以我会建议采取看看这里一个伟大的教程有关自动布局 HTTP: //www.raywenderlich.com/50317/beginning-auto-layout-tutorial-in-ios-7-part-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

这篇关于iOS的自动布局:动态调整控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆