Demo entry 6316099

dispatch_once

   

Submitted by anonymous on Nov 03, 2016 at 05:22
Language: Objective-C. Code size: 244 Bytes.

+ (UIColor *)boringColor {
    static UIColor *color;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        color = [UIColor colorWithRed:0.380f green:0.376f blue:0.376f alpha:1.000f];
    });
    return color;
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).