I want to programmatically set button for navigationItem.titleView.
I tried with following code but with no success;
UIBarButtonItem *navigationTitleButton = [[UIBarButtonItem alloc] initWithTitle:@"Custom" style:UIBarButtonItemStyleBordered target:self action:@selector(backToHOmePage)];
navigationTitleButton.image = [UIImage imageNamed:@"title.png"];
self.navigationItem.titleView = navigationTitleButton;
Warnng says: Incompatible pointer types assigning to 'UIView *' from 'UIBarButtonItem *__strong'