Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 如何使两个子视图相互交互?_Iphone_Objective C_Ios_Subview - Fatal编程技术网

Iphone 如何使两个子视图相互交互?

Iphone 如何使两个子视图相互交互?,iphone,objective-c,ios,subview,Iphone,Objective C,Ios,Subview,我有一个子视图分层问题,我有一个旋转箭头和一个UIButton。箭头旋转,UIButton根据箭头的旋转而变化。问题是我需要让UIButton可点击。此时箭头旋转,但无法触摸UIButton。如果我尝试[self.view sendSubviewToBack:wheelControl]箭头被发送到后面,不再可见 谢谢你帮我解决这个问题 你需要打电话 [theView bringSubviewToFront:theButton]; 作为布局子视图时的最后一个调用。您能否将带有按钮的视图放在带有箭

我有一个子视图分层问题,我有一个旋转箭头和一个UIButton。箭头旋转,UIButton根据箭头的旋转而变化。问题是我需要让UIButton可点击。此时箭头旋转,但无法触摸UIButton。如果我尝试
[self.view sendSubviewToBack:wheelControl]箭头被发送到后面,不再可见

谢谢你帮我解决这个问题

你需要打电话

[theView bringSubviewToFront:theButton];

作为布局子视图时的最后一个调用。

您能否将带有按钮的视图放在带有箭头的视图上?我想这可能已经解决了它:[self.view addSubview:wheelControl];[self.view将subview带到前面:myButton];