I installed a new application with a tab bar at the bottom. The following is the method of viewDidAppear:my root view controller:
- (void)viewDidAppear:(BOOL)animated
{
self.tabBarController.tabBar.alpha = 0.0f;
[UIView animateWithDuration:10.0f delay:0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
self.view.backgroundColor = [UIColor redColor];
self.tabBarController.tabBar.alpha = 1.0f;
} completion:nil];
}
I observe that as soon as the presentation appears, it has alpha = 1.0f. I expect it to start with alpha = 0.0f, and then disappear to have alpha = 1.0f. On the other hand, the background fades to have backgroundColorred as expected.
The same thing happens when I try to fade away UIToolbar.
source
share