阅读背景:

使用自动布局来支持不同iPhone大小的问题(包括图)

来源:互联网 

Everything in blue is part of an ImageView (designed it in Sketch ==> exported as PNG ==> imported into an ImageView). Because of this, it scales up nicely without any constraints. The check graphic gets bigger, as do my check marks indicating where the username and password should go. However, my TextFields (Email and PIN) don't scale up nor do they move to where the check marks indicate. I essentially want them to stay in the same relative part of the screen (e.g. 40% away from the left, 10% away from the right...) because I think that would solve my issue. I've used a variety of constraints (to superview, leading, etc.) and tried a container, but nothing has worked. I can of course export my Sketch file again with different sizes, but I don't think there's anything wrong with my background images. I cannot, however, split up my background image into smaller things because there's a background I don't want to mess with. Also, the check marks are actually boxes surrounding the username and password. Assume I have no constraints on other than the ones binding the imageView to the margins. Everything in blue is part of an ImageView (




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: