开发者

Layering UIItems

开发者 https://www.devze.com 2023-02-16 09:14 出处:网络
How does on layer objects in a view? I have a number of movable UIImageViews and would like to add a button 开发者_如何学Pythonwhich should always be a \"layer\" above the images.

How does on layer objects in a view?

I have a number of movable UIImageViews and would like to add a button 开发者_如何学Pythonwhich should always be a "layer" above the images.

Meaning that the images should not overlap the button when they are moved. They should move behind rather.

How is this done?

Thanks


When you add you image views make sure that they are behind your button. You can use 1 of the following approaches for that:

  1. Add them using insertSubview:belowSubview: method with your button as 2nd parameter

  2. After adding imageViews call bringSubviewToFront: method with your button as parameter

0

精彩评论

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