Ayush's Blog

  • Handling Network Response

    Network query-responses are an integral part of software these days. We rely for configurations, user data, updates etc etc on data from network. Aim for code that handles a response (success or failure) should be: Readability should not be compromised, given a lot of error cases need to be handled....

  • iOS Non Responsive Window

    Recently I got a strange log: 1 unexpected nil window in __dispatchPreprocessedEventFromEventQueue, _windowServerHitTestWindow: <UIWindow: 0x618000079880; frame = (0 0; 375 667); autoresize = W+H; userInteractionEnabled = NO; gestureRecognizers = <NSArray: 0x6040000f45d0>; layer = <UIWindowLayer: 0x6030000aaf50>> This would happen whenever I tapped anywhere on the screen. No Google magic could explain...

  • Localisation in iOS

    Why you need localisation? Many people do NOT speak English. English is Second most used language after Mandarin. Wikipedia So by developing you app for only English (the usual development language), you are not reaching even the largest set of people in this world. Localising an app makes it available...

  • Resetting Text Margins in TextKit on iOS

    To set the UILabel to start the text from it’s bounds (without margins) set the properties as shown below. Reference: Mastering TextKit with Katsumi Kishikawa

  • Swifty Core Data - session for WTB

    This started with an out of the blue mail that asked me if I could present at Swift WTB conference. I was reluctant at first since I have never done any presentations, and I assume myself to be a bad speaker. But after some discussions with my colleague @Manav I...

  • Using Fastlane To Submit Builds For External Testing

    pilot is yet another cool tool from fastlane tool belt. It helps you manage all your TestFlight related work from your terminal. Previously: Create an archive from Xcode. Repeatedly click “Submit”, “Next”, “Yes” etc type of buttons when submitting the build to iTunesConnect. After uploading, login to iTunesConnect Submit the...

  • Handle Code Overflow In Jekyll 3

    Code overflow in Jekyll 3 by default uses a visible value. To allow users to scroll the code you can add 1 2 3 .highlight { overflow-x: scroll; } to your syntax.css file. This will add scroll bars to your code for viewing overflowing text. Reference: MDN-overflow-x