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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:49:29+00:00 2026-05-22T23:49:29+00:00

When should I go with core graphics over images for making a custom UIButton?

  • 0

When should I go with core graphics over images for making a custom UIButton?
Is core graphics faster? Other than resolution independence, are there any other major benefits?

  • 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-05-22T23:49:30+00:00Added an answer on May 22, 2026 at 11:49 pm

    Pros of Core Graphics:

    • Code for drawing a button will probably be smaller than an image file.
    • Allows dynamic modification, slight changes without adding a complete second image.
    • As you mentioned, resolution independent.
    • Less memory intensive (doesn’t allocate memory to hold every pixel).

    Pros of images:

    • Creating the image in an editor will usually be simpler than writing code which draws it perfectly. (If you use anything other than solid colors, it could be much simpler.)
    • The editor will let you see the image beforehand without recompiling.
    • Easier to work with other built in objects (i.e., you can make it the background of a UIButton).

    As for running time, I am not sure. I would guess that CG would be faster for simple drawing, where most of the pixels aren’t changed, but images would be faster for more complex drawing where most of the pixels are changed (Assuming you use the PNG format, so it gets optomized. Otherwise, CG would probably always be faster).

    As a compromise, you could draw into an image once, and use that image for future drawing. This would allow you to get some of the benefits from each.

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

Sidebar

Related Questions

From reading the Apple Docs on Core Data, I've learned that you should not
I have a few questions about Core Location. 1) Should the user refuse permission
Should developers avoid using continue in C# or its equivalent in other languages to
I am studying Core Graphics to make dynamic textures for my project. A friend
I have not really done much programming with Core Graphics. And I tend to
I have created a custom UIButton (UIButton subclass) for my application. Within this button's
I'm looking to replicate with Cocoa/Core Graphics the process which seems to occur on
I have started to develop E-Learning application and want to know Are There any
From Apple's Core Data Programming Guide : You should give each thread its own
I am developing a puzzle game for the iPhone using core graphics implementing drawrect

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.