开发者

Overlaying a UIView on top of my existing view?

开发者 https://www.devze.com 2023-02-16 17:14 出处:网络
I have a view i want to overlay on top of another. It will be smaller and not take up the whole screen, and so it\'s important that the view behind开发者_开发百科 can still be seen. How do i do this?I

I have a view i want to overlay on top of another. It will be smaller and not take up the whole screen, and so it's important that the view behind开发者_开发百科 can still be seen. How do i do this?


If you lay another view on top of an existing view and set the rect containing the new view to some size smaller than the screen, the view in back will still be seen. Just call initWithFrame:(your CGRect size) then your [mainView addSubview:newview]. This should add your new view on top of your existing one.

0

精彩评论

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