Skip to content

Instantly share code, notes, and snippets.

@Sticktron
Created January 27, 2017 13:52
Show Gist options
  • Save Sticktron/d4a9ca2623af463ca1ecb5faf6dc0185 to your computer and use it in GitHub Desktop.
Save Sticktron/d4a9ca2623af463ca1ecb5faf6dc0185 to your computer and use it in GitHub Desktop.
Dark Messages Theme (iOS 10)
/*
* Dark theme for Messages app.
* iOS 10
* @sticktron
*/
@interface CKUITheme : NSObject
@end
@interface CKUIThemeDark : CKUITheme
@end
@interface CKUIBehavior : NSObject
@property (nonatomic, readonly) CKUITheme *theme;
- (id)theme;
@end
@interface CKUIBehaviorPhone : CKUIBehavior
@end
static CKUIThemeDark *darkTheme;
%hook CKUIBehaviorPhone
- (id)theme {
if (!darkTheme) {
darkTheme = [[%c(CKUIThemeDark) alloc] init];
}
return darkTheme;
}
%end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment