This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sips -s format png file.pdf --out file.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import PlaygroundSupport | |
class MyViewController : UIViewController { | |
override func loadView() { | |
let view = UIView() | |
view.backgroundColor = .white | |
self.view = view | |
setupStackView() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface NSObject (logProperties) | |
- (void) logProperties; | |
@end | |
#import <objc/runtime.h> | |
@implementation NSObject (logProperties) | |
- (void) logProperties { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)cutHole { | |
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init]; | |
CGMutablePathRef path = CGPathCreateMutable(); | |
CGFloat radius = self.holeView.frame.size.height / 2; | |
CGFloat x = self.holeView.frame.size.width / 2; | |
CGFloat y = self.holeView.frame.size.height / 2; | |
CGPathAddArc(path, nil, x, y, radius, 0.0, 2 * 3.14, false); | |
CGPathAddRect(path, nil, CGRectMake(0, 0, self.holeView.frame.size.width, self.holeView.frame.size.height)); |