UIViewController Archive

How to use NSLog and print only for debugging?

Why NSLog and print are dangerous? Using NSLog and print are very popular logging mechanisms in iOS applications. However, in most cases logging to standard output is useful only for debugging applications and is useless in the released application.

UIPageViewController: how to get current page index and current visible controller?

UIPageViewController has the viewControllers array property. The currently visible viewController is always the first one in the viewControllers array. Example: Objective-C: Swift: The easiest way to get the current index is to have the itemIndex property in every content controller and just retrieve its

iOS TUTORIAL: Creating a custom tabbar using Storyboard in Xcode

Custom tabbar Custom tabbar is a quite common task for an iOS developer. It’s normal –  the look and feel of the standard tabbar in iOS 7+ is quite good, but it doesn’t suite always into the app’s