Try this code
@interface ViewController ()
{
UIBarButtonItem * myBarButton;
NSTimer *time;
UIButton *b;
}
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
b = [UIButton buttonWithType:UIButtonTypeCustom];
[b setFrame:CGRectMake(12, 0, 22, 22)];
[b addTarget:self action:@selector(menuButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
[b setImage:[UIImage imageNamed:@"AddPlus_Yellow.png"] forState:UIControlStateNormal];
myBarButton = [[UIBarButtonItem alloc] initWithCustomView:b];
self.navigationItem.rightBarButtonItem=myBarButton;
time = [NSTimer scheduledTimerWithTimeInterval: 2.0 target: self selector:@selector(onTick:) userInfo: nil repeats:NO];
// Do any additional setup after loading the view, typically from a nib.
}
-(void)onTick:(NSTimer *)timer {
[b setImage:[UIImage imageNamed:@"filter.png"] forState:UIControlStateNormal];
[time invalidate];
}