All posts by Jay Versluis

About Jay Versluis

Jay is the founder of Pinkstone Pictures and WP Hosting. He has been developing iOS Apps since 2011, several of which have made it to the App Store. In his spare time he likes to develop WordPress plugins and drawing on tablet devices. He blogs about his coding journey here and at http://wpguru.co.uk.

Which iPhone should you buy (August 2018)?

Since Apple have positively and officially lost the plot when it comes to their iPhone Model Offerings, and with the “new iPhone” just around the corner, I thought I’d take a look at which iPhone model – in August 2018 – is the best one to buy.

I shudder to think what and how many other models our friends in Cupertino will announce in September, and which of the many models of iPhone currently available will be ditched from the lineup.

This article was inspired by a chat I had with a friend of mine the other day, and he asked me which iPhone he should buy. He’s an average user, by no means a fanboy or techie, but he’s been a long-time Apple user. He was genuinely confused by the current state of affairs in regards to the available iPhone models.

I agreed, and we both began to discuss the inevitable “has Apple lost the plot” aspects of iPhone developments. That aside, here’s the overall result of our discussion, strictly based my own opinion as both a hobby-developer and iPhone user.

At the time of writing, which is August 2018, we have the following lineup to choose from:

  • iPhone X (introduced in late 2017)
  • iPhone 8 and iPhone 8 Plus (late 2017)
  • iPhone 7 and iPhone 7 Plus (late 2016)
  • iPhone 6s and iPhone 6s Plus (late 2015)
  • iPhone SE (late 2015)

All these models come in various RAM and colour configurations. This is more variety than Apple has ever had on offer in the iPhone arsenal, which in and by itself suggests that they no longer know what consumers actually want. Otherwise, they’d do what they usually do: offer the latest model, and last year’s model for $100 less.

Not all of these models are going to be on offer forever, and this lineup is probably due to change in September, when traditionally new iPhone models are released.

But until then, let’s see which one is a sensible one to pick from the iPhone smorgasbord.

Continue reading





iOS 12 – First Impressions

After having used the beta version of iOS 12 for the last month or so, I can tell you that whatever Apple messed up in iOS 11, they un-did in iOS 12. It’s a lot faster than its predecessor, and the battery life is back to its former glory.

Here are my thoughts about using the iOS 12 Beta on my ageing iPhone 5s.

Continue reading





Building a Day Counter on iOS – Part 3

In this series I’ll show you how to create a simple Day Counter on iOS, using Objective-C and Xcode 9. The idea is to set a date in a settings screen, and then see how many days have elapsed on the main screen right after launching the app.

This is a 3-Part Mini-Series:

  • Part 1 is all about building the interface in Interface Builder
  • Part 2 is about coding the NSDate subtraction methods, using NSCalendar and loading/saving data using NSUserDefaults
  • Part 3 will introduce Key/Value Observing to update the first view controller as soon as the date is changed in the settings and deals with how to normalise an NSDate object.

You can find the full code on GitHub:

Happy Hacking!





Building a Day Counter on iOS – Part 2

In this series I’ll show you how to create a simple Day Counter on iOS, using Objective-C and Xcode 9. The idea is to set a date in a settings screen, and then see how many days have elapsed on the main screen right after launching the app.

This is a 3-Part Mini-Series:

  • Part 1 is all about building the interface in Interface Builder
  • Part 2 is about coding the NSDate subtraction methods, using NSCalendar and loading/saving data using NSUserDefaults
  • Part 3 will introduce Key/Value Observing to update the first view controller as soon as the date is changed in the settings and deals with how to normalise an NSDate object.

You can find the full code on GitHub:

Happy Hacking!





Building a Day Counter on iOS – Part 1

In this series I’ll show you how to create a simple Day Counter on iOS, using Objective-C and Xcode 9. The idea is to set a date in a settings screen, and then see how many days have elapsed on the main screen right after launching the app.

This is a 3-Part Mini-Series:

  • Part 1 is all about building the interface in Interface Builder
  • Part 2 is about coding the NSDate subtraction methods, using NSCalendar and loading/saving data using NSUserDefaults
  • Part 3 will introduce Key/Value Observing to update the first view controller as soon as the date is changed in the settings and deals with how to normalise an NSDate object.

You can find the full code on GitHub:

Happy Hacking!





How to pick a random character from a string in Objective-C

Imagine we had an NSString consisting of a pool of characters from which we’d like to pick one at random. Say our pool is ABCDEFGHIJKLMNOP, and we want a single character.

Here’s how we can do that:

// pool of characters
NSString *characters = @"ABCDEFGHIJKLMNOP";

// create a random number 
// between 1 and however many characters we have in the pool
uint32_t length = (uint32_t)characters.length;
NSUInteger random = arc4random_uniform(length);

// make a range
NSRange range = NSMakeRange(random, 1);

// pick a random character from the pool
NSString *letter = [characters substringWithRange:range];

The comments speak for themselves. One thing of note is the typecast of characters.length, which is needed to suppress the Xcode warning “implicit conversion loses integer precision”.

Most of the magic is provided by the NSString method substringWithRange.