开发者

How do you ensure a UIView to be frontmost?

开发者 https://www.devze.com 2023-01-28 02:42 出处:网络
I have UILabels animating on my mainView and I want to have a custom UIView pop onto the main view when a button is pressed. The labels animating in the background continue to animate and the problem

I have UILabels animating on my mainView and I want to have a custom UIView pop onto the main view when a button is pressed. The labels animating in the background continue to animate and the problem that I'm having is that the labels animate on top of my cus开发者_如何学JAVAtom UIView.

Does anyone know how I can ensure that my custom UIView is the front-most view so that the UILabels animate behind it?


You may want to look at

- (void)bringSubviewToFront:(UIView *)view

in the parent view.


@implementation UIView (moveToFront)

- (void) moveToFront {  [[self superview] bringSubviewToFront:self]; }

@end
0

精彩评论

暂无评论...
验证码 换一张
取 消