我将尝试描述这个问题 - 之前从未见过这种行为。
当应用程序在模拟器或实际设备上启动时,我有一个从应用程序屏幕右侧移动到中间的按钮。我希望它始终位于中间(它移动到的地方)。
基本上,它从父视图上的一个位置移动到另一个位置(我希望它始终处于由约束定义的位置)
我如何做到这一点?
以下是显示行为和约束的图片:
Button is on the right, higher up; then fades out
Button fades in to the bottom, centered position (correct per constraints listed below)
按钮约束:
Button.centerX = centerX(将按钮置于容器水平中心的中心位置)
底部布局Guilde.top = Button.bottom + 112(无论屏幕大小或方向如何,都将按钮固定在应用底部。)