uinavigationbar

How to add custom navigation bar to a full-screen VC in iOS 7 and make it tint the status bar to match?

别说谁变了你拦得住时间么 提交于 2019-12-01 14:18:39
In an app I'm developing (Xcode 5, >=iOS 7 auto-layout), I push a modal view controller. I want the modal view controller to have a navigation bar, so I add one, and add a constraint that positions it with it's top aligned with the top layout guide, so it is placed just under the status bar. (I'm using my own navigation bar because I want to take advantage of the system's management of the edit button and add button nav bar items. ) The standard navigation bar has a very subtle light gray tint to it. With navigation controllers, the system somehow tints the status bar, or extends the

How to hide navigation bar in iPhone?

三世轮回 提交于 2019-12-01 12:46:41
Currently i am working in iPhone app, I have two screen like A and B, A has no navigation bar, but B has navigation bar. so i set like this. Class A: - (void)viewDidLoad { [super viewDidLoad]; self.title=@"A"; [self.navigationController setNavigationBarHidden:YES]; } -(void)viewWillAppear:(BOOL)animated { [self.navigationController setNavigationBarHidden:YES]; } Class B: - (void)viewDidLoad { [super viewDidLoad]; self.title=@"B"; [self.navigationController setNavigationBarHidden:NO]; } -(void)Previousscreen { [self.navigationController popViewControllerAnimated:YES]; } then i run the

Addimg mutiple button on Navigation bar in Iphone SDK

冷暖自知 提交于 2019-12-01 12:26:50
问题 I want to add two buttons with custom image to Navigation Bar with some specific position. I found solution But it is for Right/Left Navigation Bar Button. My code for that is: NSMutableArray *buttons = [[NSMutableArray alloc] initWithCapacity:2]; UIToolbar *tools = [[UIToolbar alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 90.0f, 55.01f)]; // Add Pin button. UIBarButtonItem *bi1 = [[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStylePlain target:self action:@selector(Edit:)]

How to Move text on navigation bar

牧云@^-^@ 提交于 2019-12-01 12:21:48
Hi I have to move the text on navigation bar..I don't have any idea about scrolling text. Is anybody have idea about this please let me know. Thanks ADD this files in to your project and import it in to your class then add the following command in your view did load.I hope You are using a navigation based template for your application. http://blog.stormyprods.com/2009/10/simple-scrolling-uilabel-for-iphone.html and then in viewdidload AutoScrollLabel *autoScrollLabel=[[AutoScrollLabel alloc] initWithFrame:CGRectMake(10, 15, 320, 16)]; autoScrollLabel.text = @"Hi Mom! How are you? I really

UITableView in UITableViewController behind navigation controller on initial load

我们两清 提交于 2019-12-01 12:14:28
On the initial load of my UITableViewController the first row gets hidden behind the navigation, but if I push to another view and return to this UITableViewController it is loaded correctly and the first row isn't obscured. I can not figure this one out. Here's a screen shot of the initial load of the table and the one on the right is after I return from one of the views that was pushed by clicking a row Here's my controller code: class AccountInfoTableViewController: UITableViewController{ var delegate: AccountInfoTableViewDelegate? override func viewDidLoad() { super.viewDidLoad() self

iOS7 nav bar translucent = NO

匆匆过客 提交于 2019-12-01 12:02:21
问题 I have a background image, the same image in all views, but the nav bar traslucent is set by default to YES and the background is not homogeneous. I tried various solutions but nothing change :( my AppDelegate.h #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end my AppDelegate.m #import "AppDelegate.h" #define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >>16))/255.0 green:(

UITableView in UITableViewController behind navigation controller on initial load

混江龙づ霸主 提交于 2019-12-01 11:52:33
问题 On the initial load of my UITableViewController the first row gets hidden behind the navigation, but if I push to another view and return to this UITableViewController it is loaded correctly and the first row isn't obscured. I can not figure this one out. Here's a screen shot of the initial load of the table and the one on the right is after I return from one of the views that was pushed by clicking a row Here's my controller code: class AccountInfoTableViewController: UITableViewController{

How to hide navigation bar in iPhone?

橙三吉。 提交于 2019-12-01 11:30:38
问题 Currently i am working in iPhone app, I have two screen like A and B, A has no navigation bar, but B has navigation bar. so i set like this. Class A: - (void)viewDidLoad { [super viewDidLoad]; self.title=@"A"; [self.navigationController setNavigationBarHidden:YES]; } -(void)viewWillAppear:(BOOL)animated { [self.navigationController setNavigationBarHidden:YES]; } Class B: - (void)viewDidLoad { [super viewDidLoad]; self.title=@"B"; [self.navigationController setNavigationBarHidden:NO]; } -(void

UINavigationBar title

白昼怎懂夜的黑 提交于 2019-12-01 11:25:36
I am trying to use a UILabel to replace the title at the UINavigationBar, the code is as follows: UINavigationBar *bar = [self.navigationController navigationBar]; [bar setBackgroundColor:[UIColor blackColor]]; UILabel * nav_title = [[UILabel alloc] initWithFrame:CGRectMake(80, 2, 220, 25)]; nav_title.font = [UIFont fontWithName:@"Arial-BoldMT" size:18]; nav_title.textColor = [UIColor whiteColor]; nav_title.adjustsFontSizeToFitWidth = YES; nav_title.text = title; nav_title.backgroundColor = [UIColor clearColor]; [bar addSubview:nav_title]; [nav_title release]; The problem is that, how do I

Add target to stock back button in navigationBar

只谈情不闲聊 提交于 2019-12-01 10:31:58
I am setting the values of the title and back button in the UINavigationBar as follows: self.navigationItem.title = @"Post"; [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [[UIColor blueColor] colorWithAlphaComponent:0.75f], NSFontAttributeName : [UIFont fontWithName:@"HelveticaNeue" size:20]}]; [self.navigationController.navigationBar.backItem setTitle:@"Pop Pop !"]; But i am unable to add target to the backbutton. I have tried the following: [self.navigationItem.backBarButtonItem setTarget:self]; [self.navigationItem.backBarButtonItem