简体   繁体   中英

How to make UIButton stay always on top of loaded child view controllers?

This is how I have my controller setup:

在此处输入图片说明

The UIView is a container view. Inside this I load another view controller.

This is how the stack of controllers look:

Safe Area  
ScrollView  
ContainerView
Close Button

After I do this my close button at the bottom will be under the new loaded controller so I cannot interact with it.

Is there a way to always make the close button stay on top of the loaded view controllers ?

你可以试试这个

self.view.insertSubview(child.view, belowSubview: closeButton)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM