iOS, Objective-C, Swift, Programmatic layout, Xcode 10, Xcode 11 iOS - Creating Programmatic Layout without using Storyboard (Swift/Objective-C) There are two ways of creating layout on iOS. First, using readymade storyboard provided by Xcode when you create a new project. And second, by manually creating a UIViewController subclass and assigning it
iOS, Swift, Xcode 10.1, Xcode, Drag and Drop, DragDrop, Postmates, Interview Questions, Interview Drag and Drop on iOS using Swift Hello folks, it's been a while since I wrote my last article. Today we're going to learn how to implement drag and drop feature on iOS using Swift. To see in advance what
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
Swift, iOS, Codable, Swift 4.0, Encodable, Decodable, Swift 4.1 Using Codable Protocol in Swift 4.1 Swift 4 Codable protocol to decode and encode json data and model objects. Explained with examples.
UITableView, Swift, iOS Add headers and footers to tableview sections In the previous post, we saw how to add header and footer views to entire table view. In this post, we will see how to add header and footers to individual UITableView sectionsBefore
Xcode, debugger, Debugging, symbolic breakpoints, Advanced debugging, Swift, Objective-C, lldb, Command Line, symbolic Xcode symbolic breakpoints - Break at method call Today I am going to write about the big advanced debugging feature of LLDB. I am calling it advanced because I myself didn't know about it for a long time. It allows you
Async, Asynchronous, Swift, Gotchas, Networking Understanding the async behavior Handling async behavior is tricky. I was caught into same gotcha when I first started dealing with async code few years back. It's useful behavior in most of the programming applications, especially when
yyyy, DateFormatter, iOS, Gotchas, Tricks, Swift, Foundation Challenges of DateFormatters Working with DateFormatters is tough - At least on iOS. Today I will show with an example how I shot myself in the foot while working with simple DateFormatters problem. Here's the problem
Minesweeper, Game, Side Projects, Refactor, Advanced Swift, Swift, Objective-C Rewriting a Minesweeper - Part 3 Welcome to part 3 of the Minesweeper game. Today we will see logic behind some of the core and bonus features in the game. Highlighting tilesTiles highlighting is triggered when user taps on
Minesweeper, Game, Side Projects, Refactor, Advanced Swift, Swift, Objective-C Rewriting a Minesweeper - Part 2 Happy new year to all. I guess as I am getting old, I am not feeling enthusiastic enough about new years. There is one thing I am excited about though. Writing a rewriting
Minesweeper, Game, Side Projects, Refactor, Advanced Swift, Swift, Objective-C Rewriting a Minesweeper - Part 1 I am going to being this series of post on how I found my 4 year old Minesweeper game project written in Objective-C and process to start converting it into Swift. My goals
iOS, Swift, Xcode, Metadata, plist How to get the iOS App Metadata in Swift Working on a new app could be exciting. However, there are certain things or information which you might want to get as a part of the core feature. One of them is the
Swift, Memory Leak, Memory, weakify, unowned, retain cycle, KrakenDev, StackOverflow, iOS, Xcode, App Development, iOS Developer When to weakify Today I am going to talk about one of the discussion prone topics on iOS platforms. Detecting memory leaks and when to apply weakify. The topic came up while I was recently performing
NSObject, Equality, Equatable, Swift, Objective-C Caveats while using Equatable with NSObject Today I am going to talk about how to use Equatable with Swift and NSObject inherited objects. This is interesting because last week I came to know about the fact that Swift's inbuilt
Swift, Objective-C, Gotchas, Mistake, Error, Switch-case, Month Refactoring Gotcha Today I am going to write about recent refactoring gotcha I ran into. Hopefully this won't be a long post as I usually do. So let's move directly to the coding example. I
Monty-Hall problem, Monty hall, monty, hall, Probability, Simulation, Swift, Xcode Implementing Monty-Hall problem Today, I am going to write about the Monty-Hall problem simulation I ran programmatically. What is this Monty-Hall problem you may ask? According to Wikipedia, The Monty Hall problem is a brain teaser,
Swift, Swift 4.1, Closure, Closures, Memory Leak, Memory, iOS, Apple Swift - Fighting memory leaks in closures Swift is a great language. In fact, it's among my top 3 favorite languages. It is quite strict in terms of discipline and best practices which pay off in the long-term to offer
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
Swift 4.0, Objective-C, Swift, Tips, Tricks, structs, classes, variables, Bridging header Using Swift variables in Objective-C : Swift 4 Edition Today I ran into weird problem which prompted me to write this blog post on Objective-C and Swift interconnectedness. Before Swift 4 came along, the sure way to access Swift variables in Objective-C
Swift 3.0, Swift, map, flatMap, First class functions, Functional Programming, Functional, Functional Swift, for-loop Functional magic with Swift Last few days I have been experimenting with functional magic in Swift. Especially how map and flatMaps work. I was so amazed to know how hassle-free my life became after I understood and
Swift, Xcode 9, Xcode, Closure, Closures, iOS, Example, Demo Closure Trick in Swift Today I learned a closure trick in Swift. Usually when expression is assigned to a variable on left, it is evaluated instantly. For example, let value = complexCalculation() func complexCalculation() -> String { return
MVVM, iOS, Swift, Swift 3.0, Xcode, VIPER, Architectures, iOS Architectures Comparing VIPER vs. MVVM Recently I started playing with VIPER architecture. Although I was quite hesitant trying it out, it turns out it's not all that bad as I expected. It'e certainly better than traditional MVC iOS
Touch, Authentication, iOS8, Swift, Swift 3.0, App, Touch ID, iOS 8, Credentials, Password, Demo, Example, Tips, Github Touch ID Authentication in the app Today I am going to write about implementing and using Touch ID authentication in an iOS app. Touch ID authentication API was introduced in iOS 8 release. It is a part of LocalAuthentication
Swift, Objective-C, Interaction, Interoperability, Bridging header, generated header file, gap, Bridging, Mix and Match, MixMatch, Github, Example, Tips, Gotchas Swift and Objective-C Interaction In this post I am going to write how you can use Swift code in Objective-C and vice versa. I have run into this problem multiple times and every time I hit the
Core Data, Swift, Database, Persistency, Migration Core Data Migration - Part 1 (Adding new fields) While working on tiny side project, I realized that Xcode has made significant change in how core data migration takes place. Earlier, like couple of years ago I recall how I ran into