Quickies

[categories] [index] [all (531)] [latest]

Cocoa UIKit
  1. - (UIImage *)image {
        UIGraphicsBeginImageContext(self.frame.size);
        [self.layer renderInContext:UIGraphicsGetCurrentContext()];
        UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();
        return img;
    }