iOS: Adding rounded corners in a layer



    CALayer *layer = roundedFrameView.layer;
    layer.cornerRadius = 8.0f;
    layer.borderColor = [[UIColor colorWithRed:0.89 green:0.89 blue:0.98 alpha:1] CGColor];
    layer.borderWidth = 0.8;

The RGB color above will render a light gray color which is ideal for a rounded frame. Check out my screen shot below. You notice the frame where it covers the string "The Item is list as "On Sale"..." is being framed.



Comments

Popular posts from this blog

Converting sectors into MB - Useful in understanding the sectors in iostat in Linux

What is Disk Contention?

Installing MySQL from source: Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)