I am trying to implement a hidden UITabBar in my application. I have configured all the animations and they work very well. I just have a problem with my UIButton "pull-tab" tab to show the tab bar. It does not respond to the UIControlEventTouchUpInside touch event. I add pull-tab to UITabBar in UITabBarController:
- (void)viewDidLoad { [super viewDidLoad]; //Add pull pullButton = [UIButton buttonWithType:UIButtonTypeCustom]; UIImage *image = [UIImage imageNamed:@"TabBarPull.png"]; pullButton.frame = CGRectMake(self.tabBar.frame.size.width - image.size.width, -image.size.height + 3, image.size.width, image.size.height); [pullButton setImage:image forState:UIControlStateNormal]; [pullButton addTarget:self action:@selector(pullBarTapped:) forControlEvents:UIControlEventTouchUpInside]; pullButton.userInteractionEnabled = YES; [self.tabBar addSubview:pullButton]; }
Here's what the tab bar looks like open and closed:


Edit: I decided that the problem is that the button is beyond the scope of the UITabBar. It looks like I will need to put a button outside of the UITabBar ... An animated nightmare.
ios uibutton uiview uitabbarcontroller uitabbar
Brandon mqq
source share