0

How to show image icon of tabbar in full size like in this image you can see. see this image

This is my image here you can't see the image is going to be not perfectthis is my image

How to show my image looks like the above image show I have used for showing image this code navigationController2.tabBarItem.image = [UIImage imageNamed:@"camera_btn"];

Hey I have found the solution for that but I can't know how to change the tabbar controllers view and i can't make my camera button like they do here I am creating tabbar controller from AppDelegate.m file like this

self.tabbarController = [[[UITabBarController alloc] init] autorelease];
self.tabbarController.viewControllers = [NSArray arrayWithObjects:navigationController1,     navigationController2, navigationController3, nil];

This gives me output as in second image I have shown but from example and the code that I have seen from here raised tabbar icons

I have to used this code but it doesn't give me exact result as i want and i think it is not going to change the views also please help me.

self.tabbarController.viewControllers = [NSArray arrayWithObjects:
                    [self viewControllerWithTabTitle:@"Feed" image:[UIImage imageNamed:@"112-group.png"]],
                    [self viewControllerWithTabTitle:@"Popular" image:[UIImage imageNamed:@"29-heart.png"]],
                    [self viewControllerWithTabTitle:@"Share" image:nil],
                    [self viewControllerWithTabTitle:@"News" image:[UIImage imageNamed:@"news.png"]],
                    [self viewControllerWithTabTitle:@"@user" image:[UIImage imageNamed:@"123-id-card.png"]], nil];

this is my image.!

i have also add this code for creating center button in appdelegate.m

-(void)willAppearIn:(UIWindow *)navigationController
{
    [self addCenterButtonWithImage:[UIImage imageNamed:@"cameraTabBarItem.png"] highlightImage:nil];
}

the examples image of Raised tabbar button

Irfan
  • 4,301
  • 6
  • 29
  • 46
Hrushikesh Betai
  • 2,227
  • 5
  • 33
  • 63

2 Answers2

1

You'll have to build your own version of the uitabbar (or use an open source). Because the normal UITabbar leaves space for the text label, even when it is empty.

ejazz
  • 2,458
  • 1
  • 19
  • 29
  • can you pls guide me more as i can see in first image i think it is native tabbar.but in second image the camera icon is not going to show properly.pls explain more for i want to show camera image like in first screenshot image. – Hrushikesh Betai May 19 '12 at 04:57
  • how to create custom UItabbar? can you tell me? – Hrushikesh Betai May 19 '12 at 08:28
  • They have mimiced the real uitabbar, but made an exception for the camera icon. The link above makes it able to use image for the buttons, so you can design them how you like :) (I used them here: http://itunes.apple.com/nl/app/seats2meet.com-workspace/id470550354?mt=8) – ejazz May 20 '12 at 19:13
0

Make your images the correct size 30x30 e.g. tab1icon.png and 60x60 tab1icon@2x.png

ader
  • 5,403
  • 1
  • 21
  • 26
  • hey i know all this but icon size but as i asked i want to show only camera icon. not the text see on first image it is going to be showed camera icon in full size ad in second image the icon is going to be not seen in full size. pls guide. – Hrushikesh Betai May 19 '12 at 04:55