tags:

views:

41

answers:

1

Hi, I am using normal UIViewcontroller. But when i use pushviewcontroller in it, it is not working? What i have to do ? Any help?

+3  A: 

You need to replace your use of UIViewController with a UINavigationController. UIViewController by does not support push/pop of view controllers.

Greg Martin
i asked to use like userdefined navigation controller in the normal UIView controller,if i add protocal,will it work?
Mikhail Naimy
No it will not, a protocol doesn't implement anything, it just specifies the methods you must implement. There is not reason not to simply change your implementation to use a UINavigationController instead of a UIViewController.
Greg Martin
What do you mean by a "user defined" navigation controller? Normally you use a standard navigation controller, customize the attributes of it, then configure it to use a specific UIViewController as it's default root controller. The UIViewController is displayed inside the navigation controller and can tell the navigation controller to push new view controllers by creating them and then calling self.navigationController.pushWhateverBlabla
Nimrod