iOS Developer Tips

Countdown to a point in time using NSDate and NSDateFormatter

Last year we wrote an app for a summer camp – Camp Morasha – for the iPad, iPhone and iPod touch. Part of the app had a large countdown to when camp started. Programming a countdown in iOS is not particularly difficult but it does have a few challenges.
In the UIViewController that contains the countdown…

Read More

Display UIAlertView when a new version of your app is available

On the iPhone and iPad updates are managed by the App Store app which will get a badge (a red circle with a number in it) when any app has an update available. Some users update all the app and never let the number…

Read More

Finding Jewish Holidays with NSDate and NSCalendar

Finding the NSDate of a the next Jewish holidays is pretty easy with NSDate and NSCalendar. First figure out what point in time the holiday fall on, then convert that point in time to something useable.
If you know what Jewish calendar date you are looking for it is pretty easy, for example Passover is the 15th of Nisan,…

Read More

NSDate and its friends

NSDate and its friends

Dates and time in iOS can be very confusing. There are many classes that interact in different ways whereas many other languages have a single date class. These interactions are not immediately obvious and iOS documentation rarely presents overviews and instead just jumps into the minutiae. Lets start by summarizing the basic date and time classes NSDate,…

Read More

CAEmitterLayer – adding fire to your UIViews

CAEmitterLayer – adding fire to your UIViews

In IOS 5 a cool feature that was adding was the CAEmitterLayer class. It allows you to make a latter “emit” objects. You can control the rate, direction, color, opacity, rotation, shape and behavior of these objects to make some very nice effects such as fire, smoke, and water.
Ray Wenderlich has a great turtorial for how to…

Read More

Currency Rate Finder For iOS

Currency Rate Finder For iOS

Intro
In this post I’ll show and explain about a custom class that I wrote to find updated currency rate.
The class will keep a cache of recently fetched rates. Each rate will be valid for 24 hours only.
The Web Service
Apparently Google have their own web service for converting all kinds of stuff (including currencies, metric units etc.)
The web service…

Read More