iPhone自定义leftBarButtonItem fashing popViewControllerAnimated:YES

时间:2012-06-19 17:32:16

标签: iphone ios uibarbuttonitem viewdidload

我在viewController中添加了自定义后退按钮。

UIImage *buttonImage = [UIImage imageNamed:@"button_back.png"];
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button setImage:buttonImage forState:UIControlStateNormal];
    button.frame = CGRectMake(0, 0, buttonImage.size.width, buttonImage.size.height);
    [button addTarget:self action:@selector(backClicked:) forControlEvents:UIControlEventTouchUpInside];
    UIBarButtonItem *customBarItem = [[UIBarButtonItem alloc] initWithCustomView:button];
    self.navigationItem.leftBarButtonItem = customBarItem;
    [customBarItem release];

但是,leftBarButtonItem正在闪烁:

-(void)backClicked:(id)sender{
    [self.navigationController popViewControllerAnimated:YES];
}

你可以帮我禁用按下后退按钮的闪烁吗?

0 个答案:

没有答案