Quickies

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

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