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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:33:53+00:00 2026-05-27T09:33:53+00:00

Can I know how to have the emboss effect as the text Reminders as

  • 0

enter image description here

Can I know how to have the emboss effect as the text “Reminders” as shown on the picture?

It looks like the text are embedded?

Thanks

  • 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-27T09:33:53+00:00Added an answer on May 27, 2026 at 9:33 am

    UPDATE FOR iOS 7.0

    In iOS 7.0, Apple added a new attribute, NSTextEffectAttributeName, for attributed strings. If your deployment target is iOS 7.0 or later, you can set this attribute to NSTextEffectLetterpressStyle to draw an attributed string in an embossed style.

    ORIGINAL

    I can’t say for certain how Apple draws the embossed text. It looks to me like they fill the string glyphs with a reddish color, then apply a shadow around the interior edges of the glyphs, and also apply a very faint shadow along the top outside edges of the glyphs. I tried it out and here’s what it looks like:

    iPhone simulator screen shot

    On top is my rendering. Below that is a simple UILabel with shadow as Chris suggested in his answer. I put a screen shot of the Reminders app in the background.

    Here’s my code.

    First, you need a function that creates an image mask of your string. You’ll use the mask to draw the string itself, and then to draw a shadow that only appears around the inside edges of the string. This image just has an alpha channel and no RGB channels.

    - (UIImage *)maskWithString:(NSString *)string font:(UIFont *)font size:(CGSize)size
    {
        CGRect rect = { CGPointZero, size };
        CGFloat scale = [UIScreen mainScreen].scale;
        CGColorSpaceRef grayscale = CGColorSpaceCreateDeviceGray();
        CGContextRef gc = CGBitmapContextCreate(NULL, size.width * scale, size.height * scale, 8, size.width * scale, grayscale, kCGImageAlphaOnly);
        CGContextScaleCTM(gc, scale, scale);
        CGColorSpaceRelease(grayscale);
        UIGraphicsPushContext(gc); {
            [[UIColor whiteColor] setFill];
            [string drawInRect:rect withFont:font];
        } UIGraphicsPopContext();
    
        CGImageRef cgImage = CGBitmapContextCreateImage(gc);
        CGContextRelease(gc);
        UIImage *image = [UIImage imageWithCGImage:cgImage scale:scale orientation:UIImageOrientationDownMirrored];
        CGImageRelease(cgImage);
    
        return image;
    }
    

    Second, you need a function that inverts that mask. You’ll use this to make CoreGraphics draw a shadow around the inside edges of the string. This needs to be a full RGBA image. (iOS doesn’t seem to support grayscale+alpha images.)

    - (UIImage *)invertedMaskWithMask:(UIImage *)mask
    {
        CGRect rect = { CGPointZero, mask.size };
        UIGraphicsBeginImageContextWithOptions(rect.size, NO, mask.scale); {
            [[UIColor blackColor] setFill];
            UIRectFill(rect);
            CGContextClipToMask(UIGraphicsGetCurrentContext(), rect, mask.CGImage);
            CGContextClearRect(UIGraphicsGetCurrentContext(), rect);
        }
        UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();
        return image;
    }
    

    You can use those in a function that draws the string in red and applies a shadow to its interior edges.

    -(UIImage *)imageWithInteriorShadowAndString:(NSString *)string font:(UIFont *)font textColor:(UIColor *)textColor size:(CGSize)size
    {
        CGRect rect = { CGPointZero, size };
        UIImage *mask = [self maskWithString:string font:font size:rect.size];
        UIImage *invertedMask = [self invertedMaskWithMask:mask];
        UIImage *image;
        UIGraphicsBeginImageContextWithOptions(rect.size, NO, [UIScreen mainScreen].scale); {
            CGContextRef gc = UIGraphicsGetCurrentContext();
            // Clip to the mask that only allows drawing inside the string's image.
            CGContextClipToMask(gc, rect, mask.CGImage);
            // We apply the mask twice because we're going to draw through it twice.
            // Only applying it once would make the edges too sharp.
            CGContextClipToMask(gc, rect, mask.CGImage);
            mask = nil; // done with mask; let ARC free it
    
            // Draw the red text.
            [textColor setFill];
            CGContextFillRect(gc, rect);
    
            // Draw the interior shadow.
            CGContextSetShadowWithColor(gc, CGSizeZero, 1.6, [UIColor colorWithWhite:.3 alpha:1].CGColor);
            [invertedMask drawAtPoint:CGPointZero];
            invertedMask = nil; // done with invertedMask; let ARC free it
    
            image = UIGraphicsGetImageFromCurrentImageContext();
        }
        UIGraphicsEndImageContext();
        return image;
    }
    

    Next you need a function that takes an image and returns a copy with a faint upward shadow.

    - (UIImage *)imageWithUpwardShadowAndImage:(UIImage *)image
    {
        UIGraphicsBeginImageContextWithOptions(image.size, NO, image.scale); {
            CGContextSetShadowWithColor(UIGraphicsGetCurrentContext(), CGSizeMake(0, -1), 1, [UIColor colorWithWhite:0 alpha:.15].CGColor);
            [image drawAtPoint:CGPointZero];
        }
        UIImage *resultImage = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();
        return resultImage;
    }
    

    Finally, you can combine those functions to create an embossed image of your string. I put my final image into a UIImageView for easy testing.

    - (void)viewDidLoad
    {
        [super viewDidLoad];
    
        CGRect rect = self.imageView.bounds;
        NSString *string = @"Reminders";
        UIFont *font = [UIFont systemFontOfSize:33];
        UIImage *interiorShadowImage = [self imageWithInteriorShadowAndString:string
            font:font
            textColor:[UIColor colorWithHue:0 saturation:.9 brightness:.7 alpha:1]
            size:rect.size];
        UIImage *finalImage = [self imageWithUpwardShadowAndImage:interiorShadowImage];
    
        self.imageView.image = finalImage;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

like in java I have: Class.getSuperClass().getDeclaredFields() how I can know and set private field
I have a created an EditText. I can know text change using TextChangedListener. But
I know I can have 1 parent element and 1 child element in my
I know: I have to sign the applet so it can read files How
I have a query that I know can be done using a subselect, but
this question can create a misunderstanding: I know I have to use CSS to
I have code that uses jquery.slideup and jquery.slidedown How can i know that div
I have a git repository with multiple branches. How can I know which branches
I have a Django project. Given a url, how can I know which view
I know this can be done and i have seen it done using some

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.