In this article I listed 5 most common missteps while starting iOS application. Typically beginners might have taken these approaches. 1. Internet connectivity status checking over response error : It is essential to check network connectivity status offline or online before starting services. To test reachability you might wrote in response callback : Problem : Time consuming in case URL takes tool long to respond. More over you cannot rely on server to check connectivity. Simply because server may be down at the moment you sent request. Solution : Use Apple’s Reachability class. It can monitor network status of WiFi or Cellular data instantly. Notifies in case network status changes. Bonus - Also make sure app works in iPv6 network as well. 2. Textfield behind keyboard : Credit : Stackoverflow.com We start developing app in Xcode and run in Simulator. By default keyboard preference of simulator is hidden and we kept using Mac keybo...
Recently I published a countdown app . At one point of development - I have to show a timer on a UILabel which ticks on each seconds. As usual I started setting text to a label object - self .timerLabel.text = someString Easy piece of cake right !? But wait ... it won't take much user attention when timer ticks on every seconds. So I decided to make use of a simple animation while label gets text update. I found there are dozens of ways to animate a label. In this short article, I listed 3 best way you can animate text on a label. ( Spoiler Alert 👀- I decided to go with 3rd option) 1. Fade In - Fade out animation : CATransition class has got transition type `fade`. With timing function of CATransition - I was able to see the below result. let animation: CATransition = CATransition () animation.timingFunction = CAMediaTimingFunction (name: CAMediaTimingFunctionName .easeInEaseOut) animation.type = CATransitionType .fade animation.subtype = C...