Сообщения

Сообщения за 2017

Xcode Source Extensions Setup

First do this If you're running this on  OS X  10.11 like I am, you'll need to run  sudo /usr/libexec/xpccachectl  in terminal and reboot before Xcode will even attempt to load your extensions. It has something to do with new SDKs being installed and the XPC service in El Capitan not expecting it. Then choose there https://github.com/tib/awesome-xcode-extensions

Swizzling UIButton example

+ (void)load {    static dispatch_once_t onceToken;    dispatch_once(&onceToken, ^{        Class class = [self class];                SEL originalSelector = @selector(_sendActionsForEvents: withEvent;        SEL swizzledSelector = @selector(fb_sendActionsForEvents: withEvent;                Method originalMethod = class_getInstanceMethod(class, originalSelector);        Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);                BOOL didAddMethod =        class_addMethod(class,                        originalSelector,                        method_getImplementation(swizzledMethod),                        method_getTypeEncoding(swizzledMethod));                if (didAddMethod) {            class_replaceMethod(class,                                swizzledSelector,                                method_getImplementation(originalMethod),                                method_getTypeEncoding(originalMethod));        } else {            method_exc

Install Sublime to terminal

Watch what shortcuts there are already: Terminal -> Alt+Cmd+G -> /usr/local/bin Add sublime ln -s "/Applications/ Sublime Text .app/Contents/SharedSupport/bin/subl" /usr/local/bin/ subl *bold text can change