uinavigationbar

adding a layer mask to UIToolBar/UINavigationBar/UITabBar breaks translucency

一个人想着一个人 提交于 2019-12-23 09:42:03
问题 Im upgrading my UI to iOS 7, and have been using a custom tab bar which has a CAShapeLayer used as a mask. Ive been trying to add dynamic blur by having a UIToolBar underneath, but if i try setting the layer.mask property on the toolbar translucency is gone, and i just have it semi transparent (but masking works of course). Is there a way to get this working? Ive also seen this behavior when adding a subview to these classes. 回答1: If "translucency is gone" means it becomes totally transparent

iPhone Navigation Bar Title text color do not change in function viewWillAppear() or viewWillDisappear in iOS 11

梦想与她 提交于 2019-12-23 09:34:14
问题 The error did not happen in iOS 10. The default of title text color is black color, when navigate to new screen (2) i change the title text color to pink color in viewWillAppear(), and in viewWillDisappear i change this to default color. The logic is ok with iOS 10, but with iOS 11 the first screen that have the bar title color is pink color (the expected is default color) In addition : when add logic change color in viewWillAppear() (the color do not change in this situation) however this

UIBarButtonItemStyleDone does not create blue buttons in navigation bar when controller is pushed

我们两清 提交于 2019-12-23 08:51:20
问题 I've searched around on several different forums and can't seem to find an answer for this. I have added a bar button item to a navigation controller and set its style to UIBarButtonItemStyleDone. When this is the first controller on the navigation stack, the button properly shows up blue. However, when the controller is created and pushed onto the stack, the style is ignored and it shows up black. I know that this problem occurs when the tintColor has been changed, but I am using the

iOS 11 prefersLargeTitles Weird Transition

杀马特。学长 韩版系。学妹 提交于 2019-12-23 08:00:08
问题 So I'm having a weird issue with the new large titles in iOS 11. Instead of me trying to badly and confusingly explain the issue here is a 10-second screen recording of what is happening: Screen recording of issue on YouTube As you can see there is a weird black bar that appears when transitioning between a view controller that has navigationItem.largeTitleDisplayMode = .never And one that is set to .always Thanks in advance! 回答1: Before the transition set this: self.navigationController?

Removing the cancel button from Custom camera

感情迁移 提交于 2019-12-23 07:47:27
问题 I am using a custom overlay frame, on camera. On the navigation bar I have app icon in the middle and a back button on left. So I would like to remove the default cancel button besides the capture button but I do not want to remove camera click button. I have done research but I did not find a perfect answer. I have already used the following code but it also removes the click button. [picker setShowsCameraControls:YES]; 回答1: I feel you you should add custom CameraOverlayView to your

leftbarbuttonitem does not show up in the navigation bar

旧街凉风 提交于 2019-12-23 07:37:05
问题 I've been developing an iOS app and have been having issues with using an image as the left bar button item in the navigation bar. I have attempted this in the following ways: UIImage *backButtonImage = [UIImage imageNamed:@"backbuttonCB"]; CGRect buttonFrame = CGRectMake(0, 0, backButtonImage.size.width, backButtonImage.size.height); UIButton *backButton = [[UIButton alloc] initWithFrame:buttonFrame]; [backButton setImage:backButtonImage forState:UIControlStateNormal]; UIBarButtonItem

Real time blur effect for Navigation Bar - Status bar not getting in

蹲街弑〆低调 提交于 2019-12-23 05:22:35
问题 Followed this question to get real time blur effect in Navigation Bar: func addBlurEffect() { var bounds = self.navigationController?.navigationBar.bounds as CGRect! var visualEffectView = UIVisualEffectView(effect: UIBlurEffect(style: .Light)) as UIVisualEffectView visualEffectView.frame = bounds visualEffectView.autoresizingMask = .FlexibleHeight | .FlexibleWidth self.navigationController?.navigationBar.addSubview(visualEffectView) } But the status bar remains translucent: How to fix it?

How to add dynamic/multi button in UINavigation Bar?

放肆的年华 提交于 2019-12-23 04:47:08
问题 How to add dynamic/multi button in UINavigatation Bar? Like below image: 回答1: You can use a UIToolBar which then hold hold multiple UIBarButtonItem objects. - (void)viewDidLoad { [super viewDidLoad]; // create a toolbar to have two buttons in the right UIToolbar* tools = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 133, 44.01)]; // create the array to hold the buttons, which then gets added to the toolbar NSMutableArray* buttons = [[NSMutableArray alloc] initWithCapacity:2]; // create a

How to restrict rightBarButtonItem size in UINavigationBar?

拥有回忆 提交于 2019-12-23 03:26:28
问题 I create a rightBarButtonItem with this method : - (UIBarButtonItem *)customBarButtonWithSelector:(SEL)callback { UIButton *customButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; customButton.bounds = CGRectMake(0, 0, 30.0f, 30.0f); return [[[UIBarButtonItem alloc] initWithCustomView:customButton] autorelease]; } At execution time the selector is fired when the bar is touched outside the button (near the middle). Is there a way to restrict the event responder in the defined bounds

adding icon between back button & title of navigation bar

最后都变了- 提交于 2019-12-23 03:14:20
问题 I want to put an icon by side of the title of my navigation bar. I'd prefer not to implement it as a custom titleView, because then i'll need to create a custom titleView for each controller i put on the stack (and I have pretty deep nesting). I'm adding currently as an UIImageView to a navigationBar. My problem is to calculate exactly this icon's horizontal position. It depends on the width of the back button, which has each time another title. How do I calculate this back button frame?