Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8446233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:52:31+00:00 2026-06-10T09:52:31+00:00

Hello I have been trying to customize the UItabBarItem and i have found some

  • 0

Hello I have been trying to customize the UItabBarItem and i have found some piece of code can customize the UItabbaritem but they aren’t just working me. Nothing happens when i use any of the two code. Any help will be appreciated. thx in advance

[yourTabBarItem setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor whiteColor], UITextAttributeTextColor, 
[NSValue valueWithUIOffset:UIOffsetMake(0,0)], UITextAttributeTextShadowOffset, 
[UIFont fontWithName:@"Helvetica" size:18.0], UITextAttributeFont, nil]
forState:UIControlStateNormal];

I have tried this one too, but this one isn’t working either.

 [[UITabBarItem appearance] setTitleTextAttributes:
         [NSDictionary dictionaryWithObjectsAndKeys:
          [UIColor blackColor], UITextAttributeTextColor, 
          [UIColor whiteColor], UITextAttributeTextShadowColor, 
          [NSValue valueWithUIOffset:UIOffsetMake(0, 1)], UITextAttributeTextShadowOffset, 
          [UIFont fontWithName:@"Rok" size:0.0], UITextAttributeFont, 
          nil] 
                                              forState:UIControlStateNormal];

Here is my code

ViewController.h

//  ViewController.h

#import <UIKit/UIKit.h>

@interface ViewController : UIViewController

{
    UIImage *img;
    UITabBarItem *tabBarItem;

}

@end

My ViewController.m

//  ViewController.m


#import "ViewController.h"

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self.view setBackgroundColor:[UIColor purpleColor]];
    img=[UIImage imageNamed:@"image2.jpg"];
    //[[UITabBarItem appearance] setTintColor:[UIColor yellowColor]];
   // [tabBarItem setTitleTextAttributes:<#(NSDictionary *)#> forState:<#(UIControlState)#>
 //   tabBarItem=[[UITabBarItem alloc]initWithTitle:@"View1" image:img tag:0];

    [[UITabBarItem appearance] setTitleTextAttributes:
     [NSDictionary dictionaryWithObjectsAndKeys:
      [UIColor blackColor], UITextAttributeTextColor, 
      [UIColor whiteColor], UITextAttributeTextShadowColor, 
      [NSValue valueWithUIOffset:UIOffsetMake(0, 1)], UITextAttributeTextShadowOffset, 
      [UIFont fontWithName:@"Rok" size:0.0], UITextAttributeFont, 
      nil] 
                                             forState:UIControlStateNormal];
    self.tabBarItem=tabBarItem;
}

@end

And my AppDelegate.h

//  AppDelegate.h

#import <UIKit/UIKit.h>
#import "ViewController.h"
#import "ViewController1.h"
#import "ViewController2.h"

@interface AppDelegate : UIResponder <UIApplicationDelegate>

{
    UITabBarController *tabBarController;
}
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) ViewController *vc;
@property (strong, nonatomic) ViewController1 *vc1;
@property (strong, nonatomic) ViewController2 *vc2;

@end

AppDelegate.m

//  AppDelegate.m

#import "AppDelegate.h"

@implementation AppDelegate

@synthesize window = _window,vc,vc1,vc2;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    tabBarController=[[UITabBarController  alloc]init];
    vc=[[ViewController alloc]init];
    vc1=[[ViewController1 alloc]init];
    vc2=[[ViewController2 alloc]init];
//    CGRect frame = CGRectMake(0.0, 0.0, 32, 48);
//    UIView *v=[[UIView alloc]initWithFrame:frame];
//    v.backgroundColor=[UIColor redColor];
   // tabBarController.view.backgroundColor=[UIColor redColor];
 //   [tabBarController adds
    NSArray *controllersArray=[[NSArray alloc]initWithObjects:vc,vc1,vc2, nil];
    // Override point for customization after application launch.
    tabBarController.viewControllers=controllersArray;
    tabBarController.selectedViewController=vc;
    [self.window setRootViewController:tabBarController];
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];
    return YES;
}
@end

I have other ViewContoller also but for now my focus is one viewController , if i can customize the one then same i can do for others, for sake of saving save space and time. thx

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T09:52:33+00:00Added an answer on June 10, 2026 at 9:52 am

    UI element customization can be done using the tutorial

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello guys, I have been trying to implement the DSUM function but failed to
I have been trying to get some basic dynamic code compilation working using the
Hello I have been trying to format this date but it keeps giving me
I have been trying to call JQuery code from Button1 but whenever I click
Hi I have been trying to learn how to add some accessibility tools but
Hello guys! I have been trying to create a if/else statement code in jQuery
Hello Guys! I have been trying to create a simple sample code for my
In my example code below, you can see that I have been trying to
Hello I have been trying to send an email in magento with out a
Hello everyone I been trying get php uploader working but having a lot of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.