i saw many posts in SO on uibutton in navigation controller and on uibutton not working but my problem is uibutton is appearing in view intead on navigation controller here is my code
showMeButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
showMeButton.frame = CGRectMake(0, 50, 100, 40);
[showMeButton setTitle:@"User Avtar"
forState:UIControlStateNormal];
[showMeButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:showMeButton];
[showMeButton addTarget:self action:@selector(showMeButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
why this line of code not working self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:showMeButton];
please help me out... thanks in advance :):)