Alaa Agwa
Alaa Agwa

Reputation: 162

How to change the background of the navigation bar of a single view?

I have an application with multiple views and the main navigation bar has a background defined in AppDelegate.m . I want one of these views to have different background.

I've tried to embed the whole view in a navigation controller but with no luck. Also I've tried to change the background from the view controller class but with no luck.

Upvotes: 0

Views: 44

Answers (1)

aman.sood
aman.sood

Reputation: 874

If you can share the code that would be really helpful. Below might help

[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"image"] forBarMetrics:UIBarMetricsDefault]

Upvotes: 1

Related Questions