UITabBar with blur - Storyboard

ios, objective-c, uitabbar, uitabbarcontroller

Solution

Well, You must create a custom UITabBar with custom background.

Something link this:

@implementation MyTabBar

- (void)awakeFromNib
{
    [super awakeFromNib];

    self.backgroundColor = [UIColor clearColor];
    [self setBackgroundImage:[UIImage imageNamed:@"transparent"]];

    UIImageView *imageView = [[UIImageView alloc] initWithFrame:self.bounds];
    [self addSubview:imageView];

    // If you want to show static blured image, then just cut it from your psd and set to imageView
    // imageView.image = [UIImage imageNamed:@"static_blured_bg"];

    // If you want to show dynamic blur, that will blur everything behind it, then you must
    // 1. make a screenshot of viewController's view that is currently showing.
    // 2. crop it with frame of tab bar.
    // 3. make it blur
    // 4. set it to image view.
    // And finally, for make it dynamic, you mast repeat stepst 1-4 every time when layout changes. (e.g. you can make a timer with 0.3 secs of tick, or something else).

    // Or, you can use https://github.com/nicklockwood/FXBlurView for dynamic blurring.
    // Choose yourself :)
}

@end

And don't forget to set class to your UITabBarController's tab bar from the storyboard to "MyTabBar".

If you decided to make your own dynamic blur, then this can be useful for you.

Category on UIImage from Apple. UIImage+ImageEffects.h UIImage+ImageEffects.m

Problem

How can I achieve blur affect on UITabBarController when using Storyboard? That is how it looks right now

Original source