I have a navigation controller in a class, and i have a uiview class, now i need to hide the navigation item of view controller on click of a button in uiview class, because its a uiview class, am unable to access self.navigationcontroller.navigationitem,.
i tried initializing the viewcontroller like this
CustViewController* custListVC=[[CustViewController alloc]init];
custListVC.navigationController.navigationItem.rightBarButtonItem.enabled=NO;
but this didnt help.