[英]Problems with scaling interface from a device to another in iOS
This issue is really frustrating and getting me crazy. 这个问题确实令人沮丧,并使我发疯。
I've read everything about AutoLayout and so on, but it happens all the time. 我已经阅读了有关AutoLayout等的所有内容,但是它一直都在发生。 My interface has a view with an image view as background and a smaller subview on top of it (corresponding to a field in my image).
我的界面有一个以图像视图为背景的视图,在它的顶部有一个较小的子视图(对应于我图像中的一个字段)。 I've tried everything but it looks like the subview does not scale accordingly with my image when switching through devices.
我已经尝试了所有方法,但是在通过设备切换时,子视图似乎无法根据我的图像缩放。 By the way, the IB preview does not show what i real get when running the iOS Simulator, is that normal?
顺便说一句,IB预览无法显示我在运行iOS Simulator时真正得到的东西,这正常吗? Why?
为什么? What do i do wrong?
我做错了什么? I'm not sure what else to try!
我不确定还有什么尝试!
http://i58.tinypic.com/34xqtc6.png http://i58.tinypic.com/34xqtc6.png
EDIT: i cannot post images :( 编辑:我不能发布图像:(
I have setup a githubrepo regarding your case, kindly have a look https://github.com/usamaiqbal83/TestingProject 我已经为您的案例设置了一个githubrepo,请看一下https://github.com/usamaiqbal83/TestingProject
Constraints for Background Image View: 背景图像视图的约束:
Constraints for Front View 前视图的约束
the most important thing to remember is ofcourse the constraint equation 当然要记住的最重要的事情是约束方程
FirstItem.Attribute1 = (SecondItem.Attribute2 * Multiplier) + Constant
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.