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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:01:13+00:00 2026-06-04T10:01:13+00:00

I want to make an effect like what you see on the right side

  • 0

I want to make an effect like what you see on the right side of the first cell here:

enter image description here

I’m guessing it’s some sort of overlay view with a gradient, but I just can’t figure out how it’s configured with transparency. I tried making my own overlay view with a gradient and set the alpha of the colors down, but it just shows up as a gray – white gradient.

CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
    CGContextRef context = UIGraphicsGetCurrentContext();

    UIColor *gradBegin = [UIColor colorWithWhite:1.0 alpha:0.8];
    UIColor *gradEnd = [UIColor colorWithWhite:1.0 alpha:0.6];
    NSArray* gradientColors = [NSArray arrayWithObjects: 
                               (id)gradBegin.CGColor, 
                               (id)gradEnd.CGColor, nil];
    CGFloat gradientLocations[] = {0, 1};

    CGGradientRef gradient = CGGradientCreateWithColors(colorSpace, (__bridge CFArrayRef)gradientColors, gradientLocations);

    CGContextDrawLinearGradient(context, gradient, CGPointMake(rect.origin.x, rect.origin.y + rect.size.height/2.0), 
                                CGPointMake(rect.origin.x + rect.size.width, rect.origin.y + rect.size.height/2.0), 0);

What exactly is going on in this screenshot, and how can I replicate 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-06-04T10:01:15+00:00Added an answer on June 4, 2026 at 10:01 am

    I wrote a simple UIView class that will draw itself faded. It is a basic UIView with the drawRect overrided:

    - (void)drawRect:(CGRect)rect
    {
        CGColorSpaceRef colourSpace = CGColorSpaceCreateDeviceRGB();
        CGContextRef context = UIGraphicsGetCurrentContext();
    
        UIColor* gradBegin = [UIColor colorWithWhite:1 alpha:0];
        UIColor* gradEnd = [UIColor colorWithWhite:1 alpha:1];
        NSArray* gradColours = [NSArray arrayWithObjects:
                                        (id)gradBegin.CGColor,
                                        (id)gradBegin.CGColor,
                                        (id)gradEnd.CGColor,
                                        (id)gradEnd.CGColor, nil];
        CGFloat gradLocs[] = { 0, 0.5, 0.9, 1 };
        CGGradientRef gradient = CGGradientCreateWithColors(colourSpace, (__bridge CFArrayRef)gradColours, gradLocs);
        CGContextDrawLinearGradient(context, gradient, CGPointMake(0, 0), CGPointMake(self.frame.size.width, 0), 0);
        CGGradientRelease(gradient);
        CGColorSpaceRelease(colourSpace);
    }
    

    This works if overlayed over your view and the view’s background is white.

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

Sidebar

Related Questions

i want to make typewriter effect like: http://img139.imageshack.us/img139/9775/screenshot0002mm2.gif dim s as string = 123
I want to make the effect like, after click the box, the box disappeared
I want to make a book page scrolling effect like the picture below. This
I want to make multiple page turn effect like flipboard. please give me suggestion
Let's say I want make some of my sources publicly available via my blog
I am building a registration page. I want to make it like SO does:
i want to make effect of press button in android when i press button
I'm trying to make a button looks like I want. I managed to do
I want make datetimepicker in my project. Using jquery how it is possible? I
I want make a bash script which returns the position of an element from

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.