ios - How to bring a subview's subview to top? -
the following print screen shows layout:
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
Post a Comment