Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 16th, 2012  |  syntax: None  |  size: 0.52 KB  |  hits: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. CGFloat width = self.view.frame.size.width;
  2.         UINavigationBar *navBar = [[UINavigationBar alloc] initWithFrame:
  3.                                                            CGRectMake(0,0,width,52)];
  4.         navBar.autoresizingMask = UIViewAutoresizingFlexibleWidth;
  5.         [self.view addSubview:navBar];
  6.        
  7.         UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd
  8.                                                                                                                                                            target:self
  9.                                                                                                                                                            action:@selector(dismissModalView:)];
  10.         self.navigationItem.rightBarButtonItem = addButton;
  11.        
  12.         [addButton release];