Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat to do when UIBarButtonItem are not visible in UINavigationBar?
    primarykey
    data
    text
    <p>Hello Everyone I am writing a simple code in ViewDidLoad, and class is child of UITableViewController, like below but buttons are not visible, while title is visible,</p> <p>Another thing that I am clicking a button which in ViewDidLoad method ViewController.m, and which is call a method, code of that method is as below</p> <pre><code>//Code of button target method -(void)statusMethod { NSLog(@"statusMethod"); Status *ob=[[Status alloc]init]; [self presentModalViewController:ob animated:YES]; } //Code of ViewDidLoad of Status.m UINavigationBar *navBar = [[UINavigationBar alloc] initWithFrame:CGRectMake(0, 0, width, 43)]; navBar.autoresizingMask = UIViewAutoresizingFlexibleWidth; [self.view addSubview:navBar]; [navBar release]; UIBarButtonItem *home = [[UIBarButtonItem alloc] initWithTitle:@"HOME" style:UIBarButtonItemStylePlain target:self action:@selector(homeMethod)]; self.navigationItem.rightBarButtonItem = home; UIBarButtonItem *add = [[UIBarButtonItem alloc] initWithTitle:@"Add" style:UIBarButtonSystemItemAdd target:self action:@selector(addMethod)]; self.navigationItem.leftBarButtonItem = add; UILabel *label = [[UILabel alloc] initWithFrame: CGRectMake(10,10,width-20,25)]; label.autoresizingMask = UIViewAutoresizingFlexibleWidth; label.text = @"Status"; label.backgroundColor = [UIColor clearColor]; label.font = [UIFont systemFontOfSize:25]; label.textAlignment = UITextAlignmentCenter; [navBar addSubview:label]; [label release]; </code></pre> <p>Any Idea, what is problem in code? I you don't understand, then u can ask me again, I will praise, if I will get solution of my problem</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload