Mocking Dependencies in Swift Unit Tests: Write Testable Code following POP
We should always write unit test for our code. We all know that, right? But sometimes having external dependencies make it very hard to test a class. Sometim...
We should always write unit test for our code. We all know that, right? But sometimes having external dependencies make it very hard to test a class. Sometim...
MVC; the age old architectural pattern; has been trusted by developers around the world to separate responsibilities of a software program regardless of lang...
Swift uses ARC (Automatic Reference Counting) similar to Objective-C to track and manage application memory. In most cases, we don’t need to bother about mem...
Singletons: Pattern or Anti-pattern?
We all have been through situations, where we had to create classes with multiple constructors or constructor with a lot of dependencies (parameters). These ...
Introduction to Strategy Pattern
Ever wanted to use an UITextView that looks like a rounded UITextFiled? Also, wished it will grow it’s height as you type your text? Well, you are in luck! H...
In iOS we always end up defining our instance variables as @property (strong) or @property(weak). But what does strong and weak mean, and when to use which o...
Using delegates in iOS and Cocoa is a very basic and fundamental part and we use them quite frequently in our codes. As like in business, cocoa uses delegate...
It has been almost or, more than 2 years I had created this controller called SHViewPager. And to my utmost surprise a lot of people actually got benefited f...
Ever felt the need to use a two dimensional array in you iOS project? Well, I have. So here is what I had done:
We all know the three basic principles of OOP: Encapsulation, Inheritance and Polymorphism. And there is also this fourth principle: Data Abstraction; though...
Now a days it is fairly common to use CocoaPods to your project as the dependency manager for your iOS and MacOs projects. I have been using it for quite som...
Hello everybody,
Hi everyone and welcome again to my blog. Today I am going to discuss a quick fix with you guys. Recently I was working in one my projects and came to a poin...
Hello guys and welcome to the third and final part of our discussion on Objective-C protocols and delegation. On the last part we had finished our code and l...
Hello again, welcome to the second part of the discussion on iOS protocol and delegates. On the previous part I left on the theoretical discussion about what...
Hello again everyone and hope you’re doing fine. Welcome to the first part of my new discussion topic. Today I am going to discuss about the Objective-C prot...
In iOS app development you might get into a point where you need to reset your full database; which in this case is in core data, quite commonly used in iOS ...