I added the info button to the navigation bar using below code:
UIButton *infoButton = [UIButton buttonWithType:UIButtonTypeInfoLight];
[infoButton addTarget:self action:@selector(showImage:)
forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:infoButton];
Now i want to hide this button at some part of the code based on some conditions. But i didn’t find any hide property for right bar button item in the navigation bar?
For making hidden, try with assigning
nilto yourrightBarButtonItemlike below.