UINavigationBar back button skinning

How can I cover a button view in a UINavigationBar?

Tried this UIBarButtonItem * myToolbarItem = [[[[UIBarButtonItem alloc] initWithImage: [UIImage imageNamed: @ "myImage.png"] style: UIBarButtonItemStyleBordered target: self action: nil] autorelease];

Not really doing it.

Thank you Tee

+1
source share
1 answer

try to do this:

UIBarButtonItem *customItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"imageName.png"] style:UIBarButtonItemStyleBordered target:self action:@selector(nameOfSomeMethod:)]; self.navigationItem.leftBarButtonItem = customItem; [customItem release]; 

This will place your custom button on the left side of the navigation bar.

Greetings
Vfn

0
source

Source: https://habr.com/ru/post/888120/


All Articles