ios - How to bring a subview's subview to top? -


the following print screen shows layout:

enter image description here

i have main view , top view , picture.

when press on picture, want semi transaprent black screen appearing on entire view:

        let scrennrect = uiscreen.mainscreen().bounds         let coverview = uiview(frame: scrennrect)         coverview.backgroundcolor = uicolor.blackcolor().colorwithalphacomponent(0.3)         self.view.addsubview(coverview) 

but want picture stay on top of coverview ?
there way can bring picture in front of coverview ?

the problem coverview , imageview have different super views.

that's why cannot bring imageview front.

in order bring imageview front need move outside of top view view contains top view , imageview.
then, can add coverview main view, , bring imageview front.

another solution: place image view inside coverview @ exact same position.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -