Note that there are some explanatory texts on larger screens.

plurals
  1. POVertical Arrow in UITabBarcontroller
    text
    copied!<p>I am creating tab bar controller In other view controller. I want to add vertical arrow on TabBar . I used IdevRecipes from github but it is showing exception..Here is my code to add tabbarcontroller.</p> <pre><code>DropboxHomeViewController *homeView = [[DropboxHomeViewController alloc]initWithNibName:@"DropboxHomeViewController" bundle:nil]; homeView.title=@"More"; UINavigationController *homeNavigation = [[[UINavigationController alloc] initWithRootViewController:homeView]autorelease ]; //tab bar initalization tabBarController = [[UITabBarController alloc]initWithNibName:nil bundle:nil] ; //number of tabs in tabbar controller tabBarController.viewControllers = [NSArray arrayWithObjects:tourNavigation,mapNavigation ,browserNavigation, dropboxNavigation,homeNavigation,nil]; tabBarController.selectedViewController = tourNavigation; tabBarController.delegate =self; //flip animation tabBarController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self presentModalViewController:tabBarController animated:YES]; </code></pre> <p>How can I add arrow in this code.</p> <p>code to add arrow Image </p> <pre><code>- (void) addTabBarArrow { UIImage* tabBarArrowImage = [UIImage imageNamed:@"TabBarNipple.png"]; self.tabBarArrow = [[[UIImageView alloc] initWithImage:tabBarArrowImage] autorelease]; // To get the vertical location we start at the bottom of the window, go up by height of the tab bar, go up again by the height of arrow and then come back down 2 pixels so the arrow is slightly on top of the tab bar. CGFloat verticalLocation = self.window.frame.size.height - tabBarController.tabBar.frame.size.height - tabBarArrowImage.size.height + 2; tabBarArrow.frame = CGRectMake([self horizontalLocationFor:0], verticalLocation, tabBarArrowImage.size.width, tabBarArrowImage.size.height); [self.window addSubview:tabBarArrow]; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload