Some notes on UIView animation

UIView animation is a simple and nice way to add to your user experience. I just wanted to point out a few suggestions when using UIView animations.

Duration (speed):
If you choose to use animation to compliment some of the stuff already happening in UIKit, either at the same time or before/after, it makes a big difference how fast your animations are. Pretty much all the UIKit animations I have come across have a duration of 0.3f and so should yours. Of course, it’s doesn’t always work 100% but for the most part, 0.3f is what you should aim for. It’s quick so your user don’t wait for something to finish animating before continuing with the next input action, and it’s not too fast so that the user doesn’t have a chance to see where the object came from or what happened.

If you have an animation happening while the keyboard animates up or down, use an animationDuration of 0.3f. Same with pushing and popping the navigationController. Annotations in MKMapView also drop at a duration of 0.3f.

0.3f is the way to go.

A simple UIView animation can be added with the following code:

[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.3f];
self.segmentControl.alpha = 1.0f;
[UIView commitAnimations];

The above example is from an app I’m doing, where the segmentControl is enabled and I increase its visibility in the toolBar at the same rate as a pin drops in the map within the same screen.

When to use animation:
A few objects come with free animation (also at a duration of 0.3f, of course). For example, when adding a UIBarButton to your UINavigationBar, consider setting these with animation. If you replace a UIBarButton with another, they’ll even animate in and out nicely during the change. When adding a pin to a map, why not drop it onto the map with an animation, instead of it suddenly appearing on a map from nowhere?

Another good advice is to do animation (whether your own or with objects that include animations) to bring attention to an object. For example, if you have a pushed view, consider what you can “add” after the view has appeared through animating your objects in viewDidAppear.

Create a better UX with animation
Consider all the ways you can use UIView animation blocks in your app to enhance the user experience. It’s a great way to create a more fluid and pleasant experience for your users. A user’s inputs and actions will feel less rough and more smooth and soft to the touch. Don’t go overboard with animations. Too many will become annoying and it’s important to use animations only where appropriate.

The best advice is probably to have a look at many of the built in apps designed by Apple as well as the many free animations that a part of UIKit objects (how UIBarButtons animate in and out when you push a UIViewController stack, how a modal view appears from the bottom, etc.).

Why the whole world can’t have iPad now

I was chatting with a friend today regarding the possible release of iPhone HD on the day of this year’s WWDC June 7th keynote. This lead us to talk about previous year’s release dates and whether the iPhone HD will be available worldwide on the same day (or at least not a US-only release).

We all know the first iPhone was released a full year before becoming available anywhere else and that recently, the iPad was released in the US prior to becoming available in other countries, including Canada. The iPad’s international premiere was even pushed back another month due to the incredibly high sales in the US.

You may already know the reasoning behind the spread in release dates or perhaps you never thought of it, but just felt annoyed by not being able to buy awesome product at the same time as the Americans. Here are my three thoughts on why iPhone and iPad have been released with spread-out released dates.

1. Test the waters
The first iPhone was a huge step for Apple. Last time they released a similar product it flopped. Diving face first into a packed market place with so much competition and going head-to-head with companies such as RIM, Motorola and Nokia was a huge step. You can argue that Apple was more fit this time around, but it’s still a big step, even for a company like Apple. It’s simply too risky to go ahead and release a new product in an entirely new product category (one can argue that Apple extended the mobile computing category and/or mobile phone category with the iPhone) without knowing how the product will be received in reality (one thing is hype (read: geeks) another thing is public reception).

Obviously the iPhone was a huge success and there was a big demand from international markets as well. Following the first iPhone, new models have generally been released more or less at the same time.

Remember the first PlayStation? Yeah, same thing… It was an entirely (though less saturated) market for Sony, which meant a late ’94 release in Japan and late ’95 release for the rest of the world. With the PlayStation 2 and PlayStation 3, release dates have been considerably less time apart (6 months and 6 days, respectively) from Japan to US/Europe.

iPad is perhaps not an entirely product for Apple (Mac + iPhone = iPad), but the spread out release dates still gives Apple a chance to test the waters and adjust their strategy for the worldwide market as needed.

2. Supply and demand
Why was the iPad delayed internationally? Well, Apple actually said so themselves. The US demand has simply been too high to keep up with production. Nintendo saw the same issue with the Wii being sold out consistently for years (however, it was simply getting ridiculous after two years. That should be enough time to sort out the manufacturing bottleneck).

From previous experiences, Apple was wise enough to contain the release to one market first and once they can keep up with demand in that market, open up for more markets, doubling the possible demand for iPads. Some people would argue that it’s great for buzz and hype if there’s so much demand for your product you can’t keep up with production. This was maybe true for Nintendo (I can’t imagine how stressful some parents must have been, trying to find their kids a Wii for Christmas), but Apple has a pretty clean history of being able to keep up with demand. Both the iPhone and iPad have been easily available since launch. Sure, there have been a few times and a few places where it has been hard to obtain one, but generally, anyone, not only hardcore release-day-campers or those who pre-order a month in advance, have been able to get their hands on an iPhone or iPad. The iPad has already found it’s way into the hands of a diverse group of consumers – not only the early adapters.

3. Manufacturing strength
With any new product comes new manufacturing methods and requirements. This was true for the iPhone and is true for the iPad as well. Over the years, Apple has expanded it’s manufacturing facilities and collection of suppliers to accommodate high sales volumes.

I can’t imagine the cost of setting up a new facility to output an unproven piece of hardware and at the same time making sure enough products are initially manufactured to keep up with an expected high demand. Just the fact that they’ve been able to produce enough iPads to sell 1 million iPads in 28 days is incredible considering they’re also starting production on iPads for other markets.

The next iPad will probably be released in all the markets where the current iPad is already available (at that time), because Apple will simply have been able to ramp up their manufacturing to accommodate the demand.

That’s my take on why the whole world can’t have iPad at the same time as the US. Feel free to add anything in the comments below :)