开发者

UIImageView on top of another UIImageView, changeing layers

开发者 https://www.devze.com 2022-12-20 17:54 出处:网络
Afternoon, I have a UIImageView that I progmatically add to the window. Infact I have multiple UIImageViews that do so and when I click on any specific UIImageView I want it to become \'top-dog\' so t

Afternoon, I have a UIImageView that I progmatically add to the window. Infact I have multiple UIImageViews that do so and when I click on any specific UIImageView I want it to become 'top-dog' so to say and be drawn over all other objects on the screen. Basically like the priority drawing for MSWindows operating systems when it comes to their windows. I've scoured all the options built in for UIImageViews when it comes to layering but I cannot seem to find any! I know it exists because in UIBuilder there is a command for sending back/front toBack/toFront. How do I access these progmatically?

Edit* Also I fear that you might have to access the order in which the subViews are pushed into the 'subView stack' and manually move these around to achieve the result that I want and if so, how would I go about doing this?

Edit2* Perhapse these are the functions I'm looking for? bringSubviewToFront 开发者_如何学编程sendSubviewToBack exchangeSubviewAtIndex Does this allow for easy Index shuffling?


UIView class has bringSubviewToFront: and sendSubviewToBack: for changing subviews z-order (see "Managing the View Hierarchy" section in class reference for more).

0

精彩评论

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

关注公众号