Skip to content

Instantly share code, notes, and snippets.

View josephsieh's full-sized avatar

Chih-Yao Hsieh josephsieh

  • Adobe Systems Incorporated
  • San Jose, CA, USA
View GitHub Profile
@josephsieh
josephsieh / CGImage Rotation.png
Last active January 26, 2024 16:12
Rotate CGImage 90 degree clock wise
CGImage Rotation.png
@josephsieh
josephsieh / Singleton.h
Last active May 12, 2016 22:15 — forked from virasio/Singleton.h
Singleton (Objective-C with ARC)
#import <Foundation/Foundation.h>
@interface MySingleton : NSObject
// ...
+ (instancetype) sharedInstance;
+ (instancetype) alloc __attribute__((unavailable("alloc not available, call sharedInstance instead")));
- (instancetype) init __attribute__((unavailable("init not available, call sharedInstance instead")));
+ (instancetype) new __attribute__((unavailable("new not available, call sharedInstance instead")));