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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:27:15+00:00 2026-06-05T22:27:15+00:00

I am experimenting with a few things for a new UI in one of

  • 0

I am experimenting with a few things for a new UI in one of my apps. I’m wondering, what is the most efficient way to add UI elements like a gradient background (keeping in mind both the size of the app as well as speed/memory consumption).

Would I be better off just creating the elements in something like Inkscape or Illustrator, and then loading them in via UIImage>UIIMageView? Or would it be best to use CGGradient or CAGradientLayer?

Also, I wonder about these kinds of things quite often and I’m wondering if someone could explain how I could test these kinds of things for myself (speed, memory consumption, overall performance).

  • 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-05T22:27:16+00:00Added an answer on June 5, 2026 at 10:27 pm

    CAGradientLayers are pretty good.I’d nearly always favour drawing gradients using CGGradient or using a CAGradientLayer over using images, particularly since you then don’t need to include retina/non-retina, iPhone/iPad combinations, and changing the colours becomes a matter of tweaking one line of code rather than regenerating a whole series of images in your imaging software.

    If you’re doing other drawing in drawRect as well, draw with a CGGradient. If you just want a background, use CAGradientLayer.

    You can analyse the performance using Instruments (product –> profile in XCode)

    • the core animation tool will give you frames per second if there is scrolling / animation
    • the time profiler tool will show you which functions are taking up your time
    • the various memory tools will show you memory consumption
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

am a newbie to wicket and am experimenting few things with it, like, I
I am experimenting with Intraweb right now, for a few small personal-use web apps
I'm developing my first MVC website and I'm experimenting with the few available grids
Been experimenting with the instagram-ruby-gem on and off for a few days - no
Experimenting with android game development. I'm using PNG format for images, and was wondering
I have a couple of iOS apps (Objective-C + iOS frameworks + a few
Few days ago I started experimenting with Mercurial, and everything went great, until I
I've been experimenting with Python as a begninner for the past few hours. I
I've noticed a few weird things about the simulator in Xcode 4.3.1. 1) The
I'm experimenting with a few ways of doing this but just thought I'd ask

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.