uinavigationbar

Extremely weird behavior of navigationBar and MPMoviePlayerController. Bug in iOS or my error?

三世轮回 提交于 2019-12-01 04:47:54
I have a MPMoviePlayerController object that plays a video fullscreen in either portrait or landscape. If I rotate orientation while the video is playing and do the rotation within a few seconds after the video starts playing and the video status bar is visible, when the video ends my navigation bar is perfect. But if I wait until the video status bar disappears a few seconds into the video playing and then rotate orientation, when the video ends my navigationBar is partially hidden behind the status bar, like pushed up. Have you ever seen something like this? I am able to recreate this bug

iOS 7 Changing UINavigationBar titleView alpha

雨燕双飞 提交于 2019-12-01 04:32:09
问题 So I am using the UINavigationBar component of iOS7, but not the UINavigationController itself. When I push a new view with my custom navigation controller, I want to change the title's alpha to 0.0 and then back, but I can't seem to get it work. I am trying to do this vc1.navBar.topItem.titleView.alpha = 0.1; It doesn't seem to have any effect. Am I missing something here, is there a correct way to achieve this? 回答1: This is how I would do it: In viewWillAppear: of the pushed viewController,

Add a UINavigationBar to a UITableViewController without a UINavigationController

爷,独闯天下 提交于 2019-12-01 03:53:54
I have an existing UITableViewController that was previously being used in a UINavigationController. I need to convert it to be presented as a modal view. However, I still want to have a navigation bar at the top. I know this sounds strange- why not present it in the UINavigationController if I want a UINavBar? I want to present it without the UITabBarController that is associated with my UINavigationController. I tried opening the XIB, adding a new view, moving the UITableView to be a subview and adding a NavigationBar to that new view as well. However this doesn't seem to make any impact and

Customized back button appears on UIImagePickerController

十年热恋 提交于 2019-12-01 03:50:11
问题 I use the following code to customize the back button on the navigation bar throughout my application: UIImage *backButton = [[UIImage imageNamed:@"backButton"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)]; UIImage *backButtonOn = [[UIImage imageNamed:@"backButton_on"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)]; [[UIBarButtonItem appearance] setBackButtonBackgroundImage:backButton forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; [[UIBarButtonItem

Change UIBarbuttonItems Color

一个人想着一个人 提交于 2019-12-01 03:39:30
How can I set UIBarButtonItem's color to green? I'm using iOS 4 , there is no tint property. please help me. In iOS 4: UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; [button setBackgroundImage:[UIImage imageNamed:@"green.png"] forState:UIControlStateNormal]; button.frame=CGRectMake(0.0, 100.0, 60.0, 30.0); [button setTitle:@"Green" forState:UIControlStateNormal]; [button addTarget:self action:@selector(yourAction) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem *myButton = [[UIBarButtonItem alloc] initWithCustomView:button]; Here you need a green image for

UINavigationBar Appearance on Modal Not Setting

爷,独闯天下 提交于 2019-12-01 03:23:37
I am using the following code in my appDelegate to set the appearance of my UINavigationBar and status bar throughout my app: [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]]; [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor whiteColor]}]; [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; This code correctly sets the appearance of everything to white everywhere except when a third-party modal viewController is prevented, such as from the Dropbox API or the Mail/Message viewController from a

Setting title of UINavigationBar

*爱你&永不变心* 提交于 2019-12-01 03:08:12
问题 I have an application which uses a main story board to include a Navigation Controller where the main view is a Table View using a prototype cell content. Each cell in the table view pushes onto a new view which I have created with it's own set of .h .m and .xib files. The table view navigation bar has its title set through the story board which works fine. However, I am having trouble setting the title for each new view after it gets pushed into view. I have the following in the viewDidLoad

iOS 11 UIRefreshControl with NavigationBar LargeTitle and SearchController disappearing

风格不统一 提交于 2019-12-01 03:04:21
I have a navigationBar with largeTitle and searchcontroller and my tableView has a refreshcontrol. When I pull to refresh the activityIndicator of refreshcontrol disappear but de refresh process continues, even when the process finish and I call .endRefreshing() of UIRefreshControll the navigationBar doesn't back to the normal size. Someone with the same problem? xxtesaxx I searched a solution for this for weeks already and today, I finally made it work. The solution is so simple, I can't believe I haven't found that earlier. I was using a normal UIViewController with a UITableView. My layout

Extremely weird behavior of navigationBar and MPMoviePlayerController. Bug in iOS or my error?

送分小仙女□ 提交于 2019-12-01 02:46:48
问题 I have a MPMoviePlayerController object that plays a video fullscreen in either portrait or landscape. If I rotate orientation while the video is playing and do the rotation within a few seconds after the video starts playing and the video status bar is visible, when the video ends my navigation bar is perfect. But if I wait until the video status bar disappears a few seconds into the video playing and then rotate orientation, when the video ends my navigationBar is partially hidden behind

Adding a UIBarButtonItem programmatically to UINavigationBar

夙愿已清 提交于 2019-12-01 02:17:46
I dropped in a UINavigationBar in UIInterfaceBuilder . I present this view modally and just want a UIBackBarButton to return to my last view. I have an outlet and property to this UINavigationBar declared. I thought in my viewDidLoad method, I could create a UIBackButton like this: UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonItemStyleBordered target:self action:@selector(goBack)]; self.navigationItem.backBarButtonItem = backButton; [backButton release]; But I do not see my UIBackBarButtonItem on the UINavigationBar . I think I am doing