开发者

Adding subview over parent View

I have a navigation view controller and I want a subview to slide on top of it when a button in the parent view is clicked. Now, the thing is when I do this:

[parentVi开发者_运维技巧ew 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!!


Hows about using a Modal View Controller....

        UsernamePasswordViewController *usernamePasswordView = [[UsernamePasswordViewController alloc] initWithNibName:@"UsernamePassword" bundle:[NSBundle mainBundle]];
        [self.navigationController presentModalViewController:usernamePasswordView animated:YES];
        [usernamePasswordView release];

This will slide upwards by default over anything


How about something like:

[parentView addSubview:slideView];
[parentView bringSubviewToFront:slideView];

// etc
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜