Real time blur effect for Navigation Bar

Apple has introduced new classes UIVisualEffectView and more to add translucency and blur effect on views from iOS 8.0 release. Here how you can use it to add a blur effect to navigation bar or any other UIView: Swift 5 func addBlurEffect() { let bounds = self.navigationController?.navigationBar.bounds let visualEffectView = UIVisualEffectView(effect: UIBlurEffect(style: .light)) visualEffectView.frame = … Read more

How do you use setTitleTextAttributes:forState in UIBarItem?

Example code: [[UIBarItem appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys: [UIColor colorWithRed:220.0/255.0 green:104.0/255.0 blue:1.0/255.0 alpha:1.0], UITextAttributeTextColor, [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0], UITextAttributeTextShadowColor, [NSValue valueWithUIOffset:UIOffsetMake(0, 1)], UITextAttributeTextShadowOffset, [UIFont fontWithName:@”AmericanTypewriter” size:0.0], UITextAttributeFont, nil] forState:UIControlStateNormal];

iOS 13 UIBarButtonItem not clickable and overlapping UINavigationBars when using UISearchController

The view debugger reveals what’s going on with this bug. The contents of the navigation bar are being copied. Here’s what the navigation bar looks like before you show the search: And here’s what it looks like afterwards: The two replicant views and the extra UILabel are the problem. I don’t know what they’re doing … Read more

Restore pre-iOS7 UINavigationController pushViewController animation

I managed to workaround the new transition type by creating a category for UINavigationController. In my case I needed to revert it to the old transition style because I have transparent viewControllers that slide over a static background. UINavigationController+Retro.h @interface UINavigationController (Retro) – (void)pushViewControllerRetro:(UIViewController *)viewController; – (void)popViewControllerRetro; @end UINavigationController+Retro.m #import “UINavigationController+Retro.h” @implementation UINavigationController (Retro) – … Read more

Push ViewController from Right To Left with UINavigationController

You can create a NSMutableArray from the navigationController’s array of viewcontrollers and insert new viewController before the current one. Then set the viewControllers array without animation and pop back. UIViewController *newVC = …; NSMutableArray *vcs = [NSMutableArray arrayWithArray:self.navigationController.viewControllers]; [vcs insertObject:newVC atIndex:[vcs count]-1]; [self.navigationController setViewControllers:vcs animated:NO]; [self.navigationController popViewControllerAnimated:YES];

UINavigationController Interactive Pop Gesture Not Working?

I have found that when using custom back buttons, the interactive pop gesture stops working (my take is that Apple cannot foresee how your custom back button will behave, so they disable the gesture). To fix this, as other mentioned before, you can set the interactivePopGestureRecognizer.delegate property to nil. In Swift, this can easily be … Read more

iOS 7, corrupt UINavigationBar when swiping back fast using the default interactivePopGestureRecognizer

TL;DR I made a category on UIViewController that hopefully fixes this issue for you. I can’t actually reproduce the navigation bar corruption on a device, but I can do it on the simulator pretty frequently, and this category solves the problem for me. Hopefully it also solves it for you on the device. The Problem, … Read more

How to go back one view in UINavigationController?

I don’t mean to be rude, but this is really well documented. A google search or even an Apple documentation search on UINavigationController will turn up exactly what you need. To programmatically pop the current view controller you use: [[self navigationController] popViewControllerAnimated:YES]; To pop to a specific view controller, you use: [[self navigationController] popToViewController:controller animated:YES]; … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)