2

我已将自定义后退按钮添加到我的 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];
}

你能帮我在按下后退按钮时禁用闪烁吗?

4

0 回答 0