Сообщения

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

Find out, what controller is on the top.

If you want to check, what controller is on the top right now, with this code all what you need is to minimize app and restore it again. And you will see an alert with the title of Controller. APPDELEGATE #import "UIViewController+Top.h" - (void)applicationWillEnterForeground:(UIApplication *)application { #ifdef DEBUG     NSString *topController = NSStringFromClass([[UIViewController topViewController] class]);     [[[UIAlertView alloc] initWithTitle:topController     message:nil     delegate:self     cancelButtonTitle:@"Ok" otherButtonTitles:nil] show]; #endif } CATEGORY @interface UIViewController (Top) + (UIViewController *)topViewController; @end #import "UIViewController+Top.h" @implementation UIViewController (Top) + (UIViewController *)topViewController { UIViewController *rootViewController = [UIApplication sharedApplication].keyWindow.rootViewController; return [rootViewController topVisibleViewController]; } - (UIVie

Xcode Swift Speed Up compilation

https://habrahabr.ru/post/317298/ //:configuration = Debug SWIFT_WHOLE_MODULE_OPTIMIZATION = YES http://stackoverflow.com/a/39477414/5790492 HEADERMAP_USES_VFS = YES http://stackoverflow.com/a/40580037/5790492 Unchecking "Find Implicit Dependencies" in Edit Scheme > "Scheme" > Build tab fixed it for me for project files. "Copy swift standard libraries" still takes forever.. http://stackoverflow.com/a/39864766/5790492 Not work, i think http://stackoverflow.com/a/40601731/5790492 Update  to Xcode 8.2

5/10/16 W

1) Xcode can run without build - Ctrl+Cmd+R 2) You can try pod example without cloning repo: pod try Google

Fr 05/09/16

1) How to start application in Xcode for different languages while testing.      In order to change default order of languages only for your XCode project, you can go to the Product > Scheme > Edit scheme, and add argument to "Run" scheme, for example: -AppleLanguages "(English,Russian)". 2) Go through all strings and take them to localizable.strings Type “cd ”, then drag in your project folder, then press enter to navigate to your project: find ./ -name "*.m" -print0 | xargs -0 genstrings -o en.lproj 3)  Git steps to create pull request Fork it! Create your feature branch:  git checkout -b my-new-feature Commit your changes:  git commit -am 'Add some feature' Push to the branch:  git push origin my-new-feature Submit a pull request :D