我有一个iOS Swift应用。在这个应用程序中,我可以通过UIPanGestureRecognizer移动图像对象(UIImageView)。这可行,但是现在我有了一个函数,该函数可以更改UITextField的值。更改此值后,将重置UIImageView的位置。 任何的想法?
First View of the App: Screenshot_1
Changing the position of the image: Screenshot_2
Click on the Button to change the value from the UITextField: The following function will be triggered:
@IBAction func changeTextField(_ sender: UIButton) {
focusField.text = "Any Text" }
The UIImageView will be reset: Screenshot_3
图像重置永远不会发生,但是会自动进行重置。
提前致谢!
问候 丹尼斯