开发者

UIView on top of parentView

开发者 https://www.devze.com 2023-01-15 21:23 出处:网络
I have a navigation view controller and I want a subview ( just a view and not a view controller) to slide on top of it when a button in the parent vie开发者_开发百科w is clicked. Now, the thing is wh

I have a navigation view controller and I want a subview ( just a view and not a view controller) to slide on top of it when a button in the parent vie开发者_开发百科w is clicked. Now, the thing is when I do this:

[parentView addSubview:slideView];

[UIView beginAnimations]

//setting the frame for sliding

[UIView CommitAnimations]

the sliding view goes under the navigation bar after sliding. I would like it to slide on top of the navigation bar of the parent view. How do I achieve this?

Essentially, all I am trying to do is: replicate the iPhone Add Contact application with the only difference being; unlike me, they don't have a navigation controller on the parentView but just a navigation bar with a system add button.

Anyone!!


if you use:

[self.navigationController presentModalViewController:view];

that will slide up a view (I think) over the navigation bar.


You have to add the view (which should be over the navigation bar) as a subview to the navigation bar.

0

精彩评论

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