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 7991469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:17:59+00:00 2026-06-04T13:17:59+00:00

How can I draw a simple BAR? Like this: Thank you.

  • 0

How can I draw a simple BAR?

Like this:

simple bar

Thank you.

  • 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-04T13:18:01+00:00Added an answer on June 4, 2026 at 1:18 pm

    You’ll want to make a UIToolbar, put it at the bottom of your XIB, and put some buttons on it. Now, this will by default give you a regular black bar, with that standard black gloss. If you want to have a custom image, there are two solutions.

    First is simply subclass UIToolbar and override its drawRect to draw a custom image. The code for overriding drawRect would look something like this:

    //in some other code somewhere, preferably on init
    self.image = [UIImage imageNamed: @"image"];
    
    - (void)drawRect:(CGRect)rect {
        [self.image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
    }
    

    Now, in iOS 5.0 there is something very useful called appearance but you have to be willing to only target 5.x+ iOS versions.

    The second, which is simpler but less versatile, is to simply stick a UIImageView at the bottom of the XIB, and place some buttons on top of it. This is much easier than above, but is less extensible, is harder to modify, and is frowned upon in iOS for good reason – it breaks general iOS conventions (and you lose some very useful functionality).

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

Sidebar

Related Questions

Can anybody suggest me a simple software to draw a figure something like in
I can draw many things using this : NSString *imagePath = [[NSBundle mainBundle] pathForResource:@dummy2.png
How I can draw a Pascal's triangle in PASCAL Programming like a diamond from
I am doing simple (for now) application to draw on canvas. I can draw
I'd like to draw a simple inset line in Interface Builder to separate some
Without using any outside APIs, how do I draw a simple green horizontal bar
in this code i'm try to draw simple olympic ring and rotate it... the
I'm developing a retained mode drawing application in GDI+. The application can draw simple
I'm trying to draw simple 2d things in my JSP application. I found this
I made a simple drawing app with which I can draw lines on a

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.