I recently stubbled across some code that was so bad I had to comment on it.
//returns a Hebrew date from a Gregorian date
- (NSDate*)convertHebrewDateWithDate:(NSDate*)date {
…
When I saw this I was shocked! As you may already know an NSDate does not have any calendar information attached to it. It is a point in time. Internally it is a…
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…
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 MoreFinding 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,…
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 MoreIn 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…