iPad 应用程序:我向导航栏添加了一些自定义按钮,如下所示:
- (void)addEditButton{
UIButton *editButton = [UIButton buttonWithType:UIButtonTypeCustom];
editButton.frame = CGRectMake(0, 0, 50, 30);
[editButton setBackgroundImage:[[UIImage imageNamed:@"images_iPad.bundle/NavigationBar_Btn_iPad.png"] stretchableImageWithLeftCapWidth:15/2.0 topCapHeight:32/2.0] forState:UIControlStateNormal];
[editButton addTarget:self action:@selector(editAction:) forControlEvents:UIControlEventTouchUpInside];
[editButton setTitle:@"Edit" forState:UIControlStateNormal];
editButton.titleLabel.font = [UIFont fontWithName:kAPPBOLDFONT size:12];
editButton.titleLabel.shadowColor = [UIColor blackColor];
editButton.titleLabel.shadowOffset = CGSizeMake(0, -1);
UIBarButtonItem *editItem = [[[UIBarButtonItem alloc] initWithCustomView:editButton] autorelease];
self.navigationItem.rightBarButtonItem = editItem;
}
我的问题是:我点击了这个按钮,它会推送到另一个viewController,在popModelViewController:animate之后,我看不到这个自定义按钮,虽然这个,它确实有效。不仅仅是这里,其他都是一样的,请帮助我。