Embed a UIViewController in a UINavigationController Programmatically

We know how to embed a ViewController in a NavigationController in Storyboard. However, I came across a scenario where I had to initiate it programmatically. The code: let viewController = MyViewController() let nav = UINavigationController(rootViewController: viewController) self.navigationController?.present(nav, animated: true, completion: nil)

Create a script using Mac terminal

Scripts save us a lot of time. While scripts are running and doing the work we would have had to do manually, we can drink coffee or talk or just chill! 😃 Here is how you can create a simple script in mac terminal. Run the following in the terminal: Paste the following or your own … Continue reading Create a script using Mac terminal

Unique ID on iOS Devices

Problem! We all know now that identifierForVendor doesn't remain unique on iOS Devices. It changes when the user deletes all of the apps from the same vendor. According to Apple: The value in this property remains the same while the app (or another app from the same vendor) is installed on the iOS device. The value … Continue reading Unique ID on iOS Devices

Android Threads and updates on Main Thread

While working on the android app, I discovered the following error: Skipped 55 frames!  The application may be doing too much work on its main thread. I realized I was running heavy processing and UI updates on the same thread. A time consuming task (such as fetching data, filtering arrays) should run in its own … Continue reading Android Threads and updates on Main Thread