0
Привет всем Я хочу, чтобы настроить titleView навигационной панели, добавив три кнопки на панели навигации в iOS7 ниже мой код, но ничего не происходитНастройка заголовка панели навигации в iOS7?
-(void)addCutomButtonsToNavigationController:(UINavigationController *)navigationController
{
UIView *customNavigationTitleView=[[UIView alloc] initWithFrame:CGRectMake(20, 0, 250, 44)];
[customNavigationTitleView setBackgroundColor:[UIColor blackColor]];
UIButton *friendRequestButton=[UIButton buttonWithType:UIButtonTypeCustom];
UIButton *messagesButton=[UIButton buttonWithType:UIButtonTypeCustom];
UIButton *notificationsButton=[UIButton buttonWithType:UIButtonTypeCustom];
[friendRequestButton setImage:[UIImage imageNamed:@"ic_clients.png"] forState:UIControlStateNormal];
[messagesButton setImage:[UIImage imageNamed:@"ic_location.png"] forState:UIControlStateNormal];
[notificationsButton setImage:[UIImage imageNamed:@"ic_message.png"] forState:UIControlStateNormal];
[friendRequestButton setFrame:CGRectMake(0, 10, 40, 40)];
[customNavigationTitleView addSubview:friendRequestButton];
[customNavigationTitleView addSubview:messagesButton];
[customNavigationTitleView addSubview:notificationsButton];
navigationController.navigationItem.titleView =customNavigationTitleView;
}