UICollectionView, UICollectionViewCell, Tutorial, Swift, Advanced Swift Tutorial - Creating Programmatic UICollectionView in Swift Creating a UICollectionView could be stressful - As compared to dealing with UITableView. But things don't have to be this way for so long. Every time I have to add a CollectionView in
Sound, AVAudio, iOS11, Swift 4.1, Swift 3.0, Tutorial, Tips, Audio File, Audio Playing audio file on iOS in Swift 4 Playing media file in apps is fun. Media usually puts constraints on system resources, but it is ok to indulge in fun once in a while. In this post we will see how
Xcode 9, Swift 3.0, Swift, Tricks, Tips, Tutorial, Xcode Preferences Random Xcode Trick Despite my regular rantings on Xcode and Apple software, I still love them. In past few years, I have used so many IDEs and trust me, Xcode is one of the best I
UIKit, iOS, Swift 3.0, Tutorial, Tips, UILabel, AutoLayout, Dynamic, Resize, Dynamic height, Dynamic width Using Autolayout to Dynamically Resize UILabel We all love Autolayout, don't we? I had a less than ideal experience with it when I started. However, after continuous practice and reading a Book - iOS Auto Layout Demystified I got
iOS, iOS10, Wrapper, Github, Open Source, API, Apple, Tutorial, Tips, Swift 3.0, 3D Touch Wrapper for 3D touch preview implementation using Swift 3.0 It's been a while since I started working on 3D touch implementation on iOS 6s Plus devices. Luckily, even through it's a hardware feature iOS simulators still supports simulation of 3D touch of
iOS10, Apple, Tutorial, Example, iOS, Database, Core Data, Caching, Cache, Swift 2.0, Swift 2.3, Mantle, Adapter, MTLManagedObjectAdapter Core Data with Mantle in Swift Today we are going to talk about how I used Core data in conjunction with Mantle wrapper to directly store and retrieve data out of database without directly interacting with Core data. This
JavaScript, Tips, Tricks, Tutorial, Web page, Live Editing, Browser, Chrome, Google Chrome, WebPage How to live edit any webpage I learned this trick to edit any web page on the fly long time ago. It was fun in the beginning and good technique to prank friends. With this technique when you type
Apple, Swift 3.0, Tutorial, Tips, Xcode 8.2.1, Xcode, Recursion, enums, Indirect Enums Indirect enums - Swift 3.0 Enums are one of my favorite parts in any language. With Swift they've got extra functionality such as adding functions, associated values and Indirect Enums. So what are indirect enums? I have learned
Github, Mac OS X, Tips, Tutorial, Git, Gitignore, Ignore, Global, Gitlab Using Global .gitignore on Mac If you're a Git user, there is high chance you might be using .gitignore file to ignore certain files from being committed into your remote repo. Now, .gitignore file differs for different languages,
Swift 3.0, Custom Operators, Tutorial, Tips, Equality, Comparison, UseYourLoaf, WeHearSwift, Sorting, Swift, Xcode, Operators, Equatable Equality and Comparison with custom objects in Swift (Equatable protocol) Few weeks ago I ran into frustrating problem. I was dealing with custom objects in Swift. (Actually struct with properties). They were being stored in an array. Now, this array was going to
Swift 3.0, Xcode 8.2.1, Tips, Tutorial, Custom Operators, Beauty, Programming, Function Overloading, Associativity, BPL Beauty of Swift Today I am going to talk about couple of Swift tricks I learned recently. First one is about operator associativity and how Swift handles it gracefully to error it out during compile time
iOS, Swift 3.0, Xcode 8.2.1, Xcode 8.2, Custom Operators, Advanced Swift, Tutorial, Swift, Infix, Postfix, Prefix, Generics, Operators Custom Operators in Swift with Generics Swift introduced us a new era of custom operators. Unlike Objective-C, it will allow us to define our own operators and perform operator overloading if necessary. Although I haven't come across such use
JavaScript, Tutorial, Tips, Interview, Closures, First class functions JavaScript Closures Fun JavaScript closures are fun. Not just because they're are sometimes hard to understand, but they make interview questions interesting to tackle. Today I am going to write about one such JavaScript interview question
Swift 3.0, Tutorial, Tips, Tail Recursion, Recursion, Optimization Tail Recursion Optimization Recently I came to know about amazing concept of tail recursion optimization. If you are a computer scientist, you must be knowing what recursion is. It is a function calling itself multiple times
iOS, Xcode, Swift, UIScrollView, Tutorial, How To Manually scrolling UIScrollView (iOS/Swift) Recently while working with one of my libraries, I realized that I wanted to manually scroll UIScrollView in any direction. (Viz. Top, Right, Bottom, Left). It took me quite time to find examples
iOS, Tutorial, Swift, Github, Library, Slider, Image Creating Image Slider with UIKit APIs Thanks to Nick Lockwood's book iOS Animation Advanced Techniques. I was able to write another implementation of Image slider. I wrote an image slider couple years back using UIScrollView for which I had
Swift, iOS, Tutorial, Xcode, AutoLayout, Tips, Game of Thrones, Debugging, lldb, Breakpoints, debugger, Breakpoint iOS - Autolayout and Resizing UILabel (iOS/Swift) Last week I had weird issue while applying autolayout rules to UITableViewCell. TableViewCell has two components attached to it. An UIImageView Two variable length UILabels stacked vertically on the top of each other
Objective-C, Xcode, Reactive Cocoa, Github, Tutorial, MVVM, ViewModel, iOS Pattern, Sample Thinking MVVM way with Objective-C Today I am going to write about one of my most favorite iOS patterns lately. MVVM (Model-View-ViewModel). They say MVC has been in iOS realm for quite a bit. However, if you ask
Tutorial, Tips, Xcode, Animation, Core Animation, Objective-C Simulate View Controller Transitions - iOS/Objective-C We all have dealt with push transition of UINavigationController as well as presentViewController and dismissViewController transitions of typical UIViewController. However, today we will learn how to emulate the transition from one viewController to
iOS, Swift, Tips, Xcode, Line Spacing, Tutorial, UIKit iOS Add spacing to line of text - Swift This week while working on one of our internal apps (Again), I came across an interesting problem to add spacing to line labels. I never knew iOS could do it. My first and
iOS, Swift, Tutorial, Tips, NSAttributedString, NSTextAttachment, Xcode, Apple Add image to UILabel with Swift (iOS) This week while working on one of our client apps I came across interesting problem of embedding images with text. To give a little idea, we wanted to display text somewhat like emojis
iOS, Tutorial, Swift, Github, Library, Open Source Animated Progress Percentage Label Library Finally, I made it. I have been thinking about creating animated progress percentage counter library an open source. Pardon me if name if confusing. I was thinking about the name for quite a
Swift, Tips, Tutorial, Special Literals Special Literals in Swift Today I learned about special literals in Swift. These literal won't add any functionality benefits to your code, but are excellent while debugging and pinpointing error and bugs. There might be more, but
Swift, Tips, Tutorial, Defer, Swift 2.0 Defer in Swift Probably many posts have already been devoted to explain the use of defer keyword in Swift. But my two cents here. Defer is the new keyword added to the Swift 2.0 to
Objective-C, Swift, Tutorial, Tips, Singleton Singletons in Swift Please don't start a barrage on me just because I mentioned the word singleton. There are various use cases where you might want to use. For example, in one of our apps, we