title: Custom and animated button in iOS Tab Bar
body: <p>I'm trying to get a custom tab bar for iPhone (iOS 6) and I've got to manage a central button that raises over the bar (based on code, <a href="https://github.com/tciuro/CustomTabBar" rel="nofollow noreferrer">https://github.com/tciuro/CustomTabBar</a>) but now I have to face another feature: buttons must blink when clicked and glossy effect has to be removed. Any suggestion about the best way to get that? I'm still relatively new programming with iOS and its animations.</p>
  
  <p>Thank you very much</p>
  
  <p>What I already have so far:</p>
  
  <p><img src="https://i.stack.imgur.com/COCba.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/DTjHx.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/NCoag.png" alt="enter image description here"></p>
  
  <p>In MBCenteredButtonVC (main entry in storyboard)</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface MBCenteredButtonViewController : UITabBarController &lt;UITabBarDelegate&gt;
  
  @property(nonatomic, weak) IBOutlet UIButton *centerButton;
  
  
  @end
  </code></pre>
  
  <p>And its implementation:</p>
  
  <pre><code> - (void)viewDidLoad
     {
         [super viewDidLoad];
  
         [self.tabBar setSelectedImageTintColor:[UIColor colorWithRed:171/225.0 green:233/255.0 blue:8/255.0 alpha:1]]; 
         [self.tabBar setBackgroundImage:[UIImage imageNamed:@"bar-back.png"]];
  
      // Do any additional setup after loading the view.
        [self addCenterButtonWithImage:[UIImage imageNamed:@"button-rocketBg.png"] highlightImage:[UIImage imageNamed:@"button-rocketBg-active.png"] target:self action:@selector(buttonPressed:)];
     }
  </code></pre>
  
  <p>Images for each item is defined within views properties using XCode. So, this way, I get a central button raised over the rest and I have changed the color for selected items but I need that they blink while content is being loading (it supposed that could take some time).</p>
  
  <p>I feel that I have to implement this functionality when buttons are pressed:</p>
  
  <pre><code>- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item
  {
      NSLog(@"Selected tab bar item: %i", item.tag);
  
  
      }
  }
  </code></pre>
  
  <p>but not sure if it the right way and how to do it exactly.</p>