Objective-C
#import <QuartzCore/QuartzCore.h>
myAlwaysOnTopView.layer.zPosition = MAXFLOAT;
Swift 3
myAlwaysOnTopView.layer.zPosition = .greatestFiniteMagnitude
参考资料:https://stackoverflow.com/questions/6511443/how-to-make-a-uiview-always-appear-at-the-front
网友评论