Search Results

Search found 36 results on 2 pages for 'uitabbaritem'.

Page 1/2 | 1 2  | Next Page >

  • UItabBarItem highlight state image

    - by Paul Solomon
    I'd like to be able to change the highlighted state image on an UITabBarItem when it is selected? Is it possible to subclass and access this? or do I need to roll my own navigation code? - start edit I didn't articulate what I was looking for earlier. I am looking for the semi-transparent white overlay reference that the device adds to the selected state/image of the UITabBar. See image! http://solomon71.com/images/UITabBarItem.png

    Read the article

  • iPhone instantiating a UITabBarItem programmatically

    - by William Jockusch
    Try as I might, I cannot get this to work. Here is my latest attempt. Can someone clue me in as to why this does not work? In a method which is called by my view controller's init method: UIImage *image = [UIImage imageNamed: @"window22.png"]; UITabBarItem *item = [[UITabBarItem alloc] initWithTitle: @"Some Title" image: image tag: 0]; self.tabBarItem = item; All it does is put a big square where the image should be. The title in the tab bar remains the same as the view controller's title. Everything is being instantiated programmatically here, including the tab bar controller.

    Read the article

  • Iphone Custom UITabBarItem without rounded edges

    - by Alex Milde
    hi i try to customize a uitabbar i extended uitabbar item and now have a customized image in it but i cant get rid of the rounded edges. code: @interface CustomTabBarItem : UITabBarItem { UIImage *customHighlightedImage; } @property (nonatomic, retain) UIImage *customHighlightedImage; @end @implementation CustomTabBarItem @synthesize customHighlightedImage; - (void) dealloc { [customHighlightedImage release]; customHighlightedImage=nil; [super dealloc]; } -(UIImage *) selectedImage { return self.customHighlightedImage; } @end maybe somoen knows how to get rid of the rounded rect around the image thanks in advance alex

    Read the article

  • How to add a badge to the system generated "More" UITabBarItem

    - by Mark Hoffman
    My app has 6 menu items, so the OS shows the first 4, then shows a "More" item that links to a screen where the user can select the other two. My problem is that I want to show a badge on the More item so that the user knows that one of the menu items that is hidden needs their attention. (It's clear to our users which hidden item the badge represents since one of the hidden items is Settings and the other is current Uploads) I don't know how to access the "More" item since the "items" array on UITabBar only contains the 6 actual UITabBarItems that I've created; it doesn't include the system generated "More" item. I've tried setting the badge on one of the hidden UITabBarItems, but no badge is ever displayed. I didn't find much on Google, which makes me wonder if I'm going about this completely wrong. The iTunes app does the same thing when you download items. They display a More item and attach a badge to it, so I figured I was in good company, but I'll be damned if I see how they did that. (Unless they manually created a UITabBarSystemItemMore item and manually handled displaying the other menu items. Ugh.)

    Read the article

  • Setting UITabBarItem title from UINavigationController?

    - by fuzzygoat
    I have setup a UITabBarController with two tabs, one is a simple UIViewController and the other is a UINavigationController using second UIViewController as its rootController to set up a UITableView. My question is with regard to naming the tabs (i.e. UITabBarItem) For the first tab (simple UIViewController) I have added the following (see below) to the controllers -init method. - (id)init { self = [super init]; if(self) { UITabBarItem *tabBarItem = [self tabBarItem]; [tabBarItem setTitle:@"ONE"]; } return self; } For the other tab I have added (see below) to the second controllers init (rootController). - (id)init { self = [super init]; if(self) { UITabBarItem *tabBarItem = [[self navigationController] tabBarItem]; [tabBarItem setTitle:@"TWO"]; } return self; } Am I setting the second tabBarItem title in the right place as currently it is not showing? EDIT: I can correctly set the UITabBarItem from within the AppDelegate when I first create the controllers, ready for adding to the UITabBarController. But I really wanted to do this in the individual controller -init methods for neatness. // UITabBarController UITabBarController *tempRoot = [[UITabBarController alloc] init]; [self setRootController:tempRoot]; [tempRoot release]; NSMutableArray *tabBarControllers = [[NSMutableArray alloc] init]; // UIViewController ONE MapController *mapController = [[MapController alloc] init]; [tabBarControllers addObject:mapController]; [mapController release]; // UITableView TWO TableController *rootTableController = [[TableController alloc] init]; UINavigationController *tempNavController = [[UINavigationController alloc] initWithRootViewController:rootTableController]; [rootTableController release]; [tabBarControllers addObject:tempNavController]; [tempNavController release]; [rootController setViewControllers:tabBarControllers]; [tabBarControllers release]; [window addSubview:[rootController view]]; [window makeKeyAndVisible];

    Read the article

  • Is there a way to disable a UITabBarItem from reloading its first view?

    - by Tanner
    Hi All, I currently have an app that is a tab bar style app and supports rotation. Everything is great until you hit the tab bar when the device is in landscape and the original view is reloaded and placed back on screen. There is a lot of space and the overall appearance doesnt look good. Is there a way to disable this tab bar item from doing this?? Any help is greatly appreciated, Thanks

    Read the article

  • How to recreate the UITabBarItem image filter?

    - by boliva
    Hi, I'm writing a custom UITabBar replacement, and I would like to know how to recreate the filter that the built-in implementation does with the UITabBarItem image - that blue shining on selected tabs and gray gradient on unselected ones. I guess it's a matter of using the source image alpha value as a mask and overlay it with a pre-made blue (or whatever color) shining image and another one grayed out, but I would like to know what is the best approach from a code point of view. Best,

    Read the article

  • UITabbar without controller

    - by Etienne
    Hello. I have a simple app where the only view controller has an outlet to a UITabBar. It also implements UITabBarDelegate and is set as the delegate for the UITabBar: @interface TheMainViewController : UIViewController <UITabBarDelegate> { IBOutlet UITabBar *theTabBar; } I implemented the following method Which gets called whenever any of my 4 UITabBarItems get tapped. I tried just doing something really simple: - (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item { tabBar.selectedItem = [tabBar.items objectAtIndex:0]; return; } In theory, it should always stay selected on my first tab and it works perfectly when I just tap any UITabBarItem (nothing happens, the first one always stays selected). But when I touch a UITabBarItem and hold it (not taking my finger off) the selection changes anyway ! Debugging, everything gets called properly. It's like changing the selectedItem property doesn't have any effect is the user still has the item "down" (with his finger on it). What would be a good workaround? I tried overloading UITabBar and messing with touchesBegan and touchesEnd but they don't even get called. Same with UITabBarItem. Oh and please don't suggest using a UITabBarController as it is not flexible enough for my application. So frustrating....thanks!

    Read the article

  • How to remove this bottom bar in UITabBar?

    - by flashsnake
    I am trying to do some customization on UITabBar. I am almost done with everything. However, I saw a small bar on the bottom of each UITabBarItem. I don't know what object it is. Can someone please tell me how to remove it? Or if someone can tell me how to make the UIImage inside the UITabBarItem to be displayed in front of that unknown bar. It is good enough. Cannot post image due to insufficient reputation.

    Read the article

  • TabBar / "More View Controller" - Possible to have icons in colors other than black?

    - by Malakim
    Hi, Is it possible to have the icons in a TabBar and / or the "More navigation controller" be in colors other than grey and black? I tried changing the color of the icon I set for the view controller using UITabBarItem's - (id)initWithTitle:(NSString *)title image:(UIImage *)image tag:(NSInteger)tag method. My client thinks the interface is too dark and want's to brighten it up with some colorful icons... Thanks!

    Read the article

  • Really cool way to create custom UITabBar for iPhone app?

    - by ludicco
    Hi, I am doing a lot of researching lately about how to get a different looking with nice effects UITabBar on my iPhone app, but unfortunately I am only finding things on how to replace background color etc. Well, I've checked out this app called Momento which is pretty cool and presents a very slick tabBar: So there are a couple of elements here I would like to ask you guys if you could help me by giving me the right directions on how to get a similar effect :) Arrow above items: as you can see this app has this animated arrow that runs above the selected item with a very smooth animation. Selected Stated of the item's image is not that blue-ish default one neither the default state which displays in a different shade of brown and gray version. nice Items separators with beveled vertical lines. diferrent background image for the tabBar different height for the tabBar At this point after some research I am able to set the height and background image by subclassing UITabBarController but I'm still not sure on how to accomplish the other items specially the first one related to the nice arrow effect. If someone knows about a very good tutorial on how to do this it would be great for clarifying what can or can't be done by subclassing the UITabBarController and specially if can be done in Interface Builder :) I am just starting on this world off app development for iOS so if you could help me on that it would be really appreciated Thanks a lot in advance

    Read the article

  • How to get title of UITabBarItem in the More section?

    - by Sheehan Alam
    I have a UITabBarControllerDelegate method that determines the title of the UITabBarItem and does something accordingly. This works well for items in my UITabBar but when I click on the More button the rest of my UITabBarItems are in a UITableView. How can I determine the title in the More section? - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { if ([self.tabBarController.selectedViewController.title isEqualToString:@"All"]) { //do something } }

    Read the article

  • iPhone:Tabbar hides when pushing from TableView to UIViewController

    - by user187532
    Hello all, I have four Tab bar items in a Tab bar which is being bottom of the view where i have the TableView. I am adding Tab bar and items programmatically (Refer below code) not through I.B. Click on first three Tab bar items, will show the data in the same TableView itself. But clicking on last Tab bar items will push to another UIViewcontroller and show the data there. The problem here is, when i push to the viewController when clicking on last Tab bar item, main "Tab bar" is getting removed. Tab bar code: UITabBar *tabBar = [[UITabBar alloc] initWithFrame:CGRectMake(0, 376, 320, 44)]; item1 = [[UITabBarItem alloc] initWithTitle:@"First Tab" image:[UIImage imageNamed:@"first.png"] tag:0]; item2 = [[UITabBarItem alloc] initWithTitle:@"Second Tab" image:[UIImage imageNamed:@"second.png"] tag:1]; item3 = [[UITabBarItem alloc] initWithTitle:@"Third Tab" image:[UIImage imageNamed:@"third.png"] tag:2]; item4 = [[UITabBarItem alloc] initWithTitle:@"Fourth Tab" image:[UIImage imageNamed:@"fourth.png"] tag:3]; item5 = [[UITabBarItem alloc] initWithTitle:@"Fifth Tab" image:[UIImage imageNamed:@"fifth.png"] tag:4]; NSArray *items = [NSArray arrayWithObjects: item1,item2,item3,item4, item5, nil]; [tabBar setItems:items animated:NO]; [tabBar setSelectedItem:item1]; tabBar.delegate=self; [self.view addSubview:tabBar]; Push controller code clicking from last Tab bar item: myViewController = [ [MyViewController alloc] initWithNibName:@"MyView" bundle:nil]; myViewController.hidesBottomBarWhenPushed=NO; [[self navigationController] pushViewController:myViewController animated:NO]; I am not seeing bottom Tab bar when i push my current TableView to myViewController. I am seeing full screen view there. I want to see bottom Tab bar always when every tab item clicked. What might be the problem here? Could someone who come across this issue, please share your suggestion to me? Thank you.

    Read the article

  • Unbalanced calls to begin/end appearance transitions for <ViewController>,<Tab>

    - by onkar
    I am trying to implement Tabs into my secondView.On button touch(from ViewController.m) I am navigating to secondView(Tabs). In my Tabs.xib file I have added a TabBar at bottom and it is custom class of UITabBar. ViewController.m - (IBAction)touchedInside:(id)sender { NSLog(@"touhced up inside"); Tabs *temp = [[Tabs alloc]initWithNibName:@"Tabs" bundle:nil]; [self.navigationController pushViewController:temp animated:YES]; [self presentViewController:temp animated:YES completion:nil]; } Tabs.m - (void)viewDidLoad { [super viewDidLoad]; AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; UITabBarController *tabBarController = [[UITabBarController alloc]init]; /* Tab_1 *firstView = [[Tab_1 alloc] init]; UITabBarItem *item1 = [[UITabBarItem alloc]initWithTitle:@"First" image:nil tag:1]; [firstView setTabBarItem:item1]; NSLog(@"after first tab is added"); Tab_2 *secondView = [[Tab_2 alloc] init]; UITabBarItem *item2 = [[UITabBarItem alloc]initWithTitle:@"Sec" image:nil tag:1] ; [secondView setTabBarItem:item2]; NSLog(@"after second tab is added"); [tabBarController setViewControllers:[NSArray arrayWithObjects:firstView,secondView,nil] animated:NO]; NSLog(@"after tab is added"); [appDelegate.window addSubview:tabBarController.view]; NSLog(@"after view is added"); */ appDelegate.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. UIViewController *viewController1 = [[Tab_1 alloc] initWithNibName:@"Tab 1" bundle:nil]; UIViewController *viewController2 = [[Tab_2 alloc] initWithNibName:@"Tab 2" bundle:nil]; UIViewController *viewController3 = [[Tab_2 alloc] initWithNibName:@"Tab 1" bundle:nil]; tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2, viewController3, nil]; appDelegate.window.rootViewController = self.tabBarController; [appDelegate.window makeKeyAndVisible]; Tabs *temp = [[Tabs alloc]initWithNibName:@"Tabs" bundle:nil]; [self.navigationController presentModalViewController:temp animated:NO]; } Errors Unbalanced calls to begin/end appearance transitions for <ViewController: 0x6833c80>. 2012-12-06 09:57:48.963 demoTabs[667:f803] Unbalanced calls to begin/end appearance transitions for <Tabs: 0x6a3fc90>.

    Read the article

1 2  | Next Page >