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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:44:54+00:00 2026-05-23T20:44:54+00:00

In my iPhone app, I’d like to alter the headers on my UITableView. How

  • 0

In my iPhone app, I’d like to alter the headers on my UITableView. How can I keep the same gradient/alpha/nice looking style of the gray, default headers, except change the color of it?

  • 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-23T20:44:55+00:00Added an answer on May 23, 2026 at 8:44 pm

    If you want to apply a gradient then you could create a custom view class and then override drawRect: and use CoreGraphics to draw a gradient
    e.g.

    - (void) drawRect:(CGRect)rect
    {
        CGContextRef currentContext = UIGraphicsGetCurrentContext();
    
        CGGradientRef glossGradient;
        CGColorSpaceRef rgbColorspace;
        size_t num_locations = 2;
        CGFloat locations[2] = { 0.0, 1 };
    
        const CGFloat *startColorComponents = CGColorGetComponents(startColor.CGColor);
        const CGFloat *endColorComponents = CGColorGetComponents(endColor.CGColor);
    
        CGFloat components[8] = { startColorComponents[0], startColorComponents[1], startColorComponents[2], startColorComponents[3],  // Start color
            endColorComponents[0], endColorComponents[1], endColorComponents[2], endColorComponents[3] }; // End color
    
        rgbColorspace = CGColorSpaceCreateDeviceRGB();
        glossGradient = CGGradientCreateWithColorComponents(rgbColorspace, components, locations, num_locations);
    
        CGRect currentBounds = self.bounds;
        CGPoint topCenter = CGPointMake(CGRectGetMidX(currentBounds), 0.0f);
        CGPoint bottomCenter = CGPointMake(CGRectGetMidX(currentBounds), CGRectGetMidY(currentBounds));
        CGContextDrawLinearGradient(currentContext, glossGradient, topCenter, bottomCenter, 0);
    
        CGGradientRelease(glossGradient);
        CGColorSpaceRelease(rgbColorspace); 
    }
    

    Then do as per Sachin’s suggestion but use your custom view class instead.

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

Sidebar

Related Questions

My iPhone app generates some very nice-looking plist files. I can look at them
my iphone app crashes unexpectedly and looking at the crash log I can't tell
My iphone app downloads user specific data from our web server. How can I
My iPhone App has custom buttons that display png-images. I like to replace the
My iPhone app is getting ready to go to production and we like to
In iPhone App, Can we take pictures at some perticular time intervals programmatically by
In iPhone App as we are displaying Toolbar with textField by: [textField setInputAccessoryView:myToolBar] can
In my iPhone App I want to implemented functionality as shown below user can
The iPhone app that I am working on requires GET calls to a 3rd
My iPhone app started logging this error: lo->hi recycling invariant violated! followed by: Program

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.