title: Add left and right bar button item in category of navigation controller class
body: <p>i have create a category of navigation controller and set title and left and right bar button in view did load of this navigation controller class (category of this class).</p>
  
  <pre><code>- (void)viewDidAppear:(BOOL)animated
  {
  
          NSArray *ver = [[UIDevice currentDevice].systemVersion componentsSeparatedByString:@"."];
          if ([[ver objectAtIndex:0] intValue] &gt;= 7) {
              self.navigationBar.barTintColor = [UIColor colorWithRed:229.0f/255.0f green:114.0f/255.0f blue:89.0f/255.0f alpha:1.0f];
              self.navigationBar.translucent = NO;
          }else{
              self.navigationBar.tintColor = [UIColor colorWithRed:229.0f/255.0f green:114.0f/255.0f blue:89.0f/255.0f alpha:1.0f];
          }
  
          UILabel *lblTitleView=[[UILabel alloc]initWithFrame:CGRectMake(0, 0, 170, 44)];
          [lblTitleView setTextColor:[UIColor whiteColor]];
          [lblTitleView setFont:[UIFont boldSystemFontOfSize:17]];
          [lblTitleView setText:[self SetnavigationTitle:self.navigationItem.title]];
          [lblTitleView setTextAlignment:NSTextAlignmentCenter];
          [lblTitleView setBackgroundColor:[UIColor clearColor]];
          [self.navigationItem setTitleView:lblTitleView];
  
         // UINavigationController*navCnt = [[UINavigationController alloc] init];
  
        UIButton *btnLeft=[UIButton buttonWithType:UIButtonTypeCustom];
          [btnLeft setFrame:CGRectMake(0, 5, 32, 32)];
          [btnLeft setImage:[UIImage imageNamed:@"btn_back.png"] forState:UIControlStateNormal];
          [btnLeft setImage:[UIImage imageNamed:@"btn_back.png"] forState:UIControlStateHighlighted];
           [btnLeft setTitle:[NSString stringWithFormat:@"%@",[self SetleftbarbuttonTitle:self.navigationItem.leftBarButtonItem.title]] forState:UIControlStateNormal];
          [btnLeft setTintColor:[UIColor grayColor]];
          [btnLeft setBackgroundColor:[UIColor greenColor]];
  
          [btnLeft setTag:101];
          [btnLeft addTarget:self action:@selector(btnAction:) forControlEvents:UIControlEventTouchUpInside];
          UIBarButtonItem *leftBarButton=[[UIBarButtonItem alloc]initWithCustomView:btnLeft];
          [self.navigationItem  setLeftBarButtonItem:leftBarButton];
          self.navigationItem.hidesBackButton=YES;
  
  
         UIButton *btnRight=[UIButton buttonWithType:UIButtonTypeCustom];
          [btnRight setFrame:CGRectMake(270, 5, 32, 32)];
          [btnRight setImage:[UIImage imageNamed:@"btn_back.png"] forState:UIControlStateNormal];
          [btnRight setImage:[UIImage imageNamed:@"btn_back.png"] forState:UIControlStateHighlighted];
          [btnRight setTitle:[NSString stringWithFormat:@"%@",[self SetRightbarbuttonTitle:self.navigationItem.rightBarButtonItem.title]] forState:UIControlStateNormal];
          [btnRight setTintColor:[UIColor clearColor]];
          [btnRight setBackgroundColor:[UIColor greenColor]];
  
  
           [btnRight setTag:102];
          [btnRight addTarget:self action:@selector(btnAction:) forControlEvents:UIControlEventTouchUpInside];
          UIBarButtonItem *rightBarButton=[[UIBarButtonItem alloc]initWithCustomView:btnRight];
  
          [self.navigationItem setRightBarButtonItem:rightBarButton];
  
          [super viewDidAppear:animated];
  
  
  }
  </code></pre>
  
  <p>when i just pass title from any view controller then its work fine for each view controller but
  now i have code for set both left and right bar button item in navigation controller sub class.</p>
  
  <p>but now on the view controller i am not getting the uibar button item of navigation controller on this view controller.
   thanks in advance.</p>