Archive for August, 2010

iPad Stylus Review

Sunday, August 29th, 2010

I admit I don’t have a strong need for a stylus when using my iPad, but there have been occasions when I wish I had one. Using my finger to take notes in a drawing app is sometimes frustrating to me. My finger drawn text is usually too large, and on hot summer days, my finger doesn’t always glide smoothly over the surface of my iPad. So I decided to give an stylus a try. The problem was, which stylus to buy.

I narrowed my search down to two styluses, the Pogo Sketch from Ten One Design and the Boxwave Capacitive iPad Stylus. I spent more time than I should have reading reviews of both only to come to the conclusion: I don’t know which one to buy. So I bought both.

The Pogo Sketch gets points for price ($10.78 on Amazon at the time), which is much less than the Boxwave ($20.95 plus $4 shipping). Both work well on my iPad. The Pogo Sketch is longer and thinner, and felt cheaper than the Boxwave. The Boxwave stylus is heavier and thicker, much like a nice ball point pen, but it is short. I personally don’t mind the shortness since I’ve carried short pens in my pocket for most of my life, but others might not care for it.

The tip on the Pogo is shaped differently than on the Boxwave. With the Pogo tip, I can hold the stylus in different positions as I draw, sort of like a pencil. The Boxwave, on the other hand, is like using a pen. I find myself holding it in the same position as I would a pen.

The Pogo tip also looks like it could wear out quickly. With both styluses I must use more pressure to draw than I would with pencil and paper. I can’t help but feel I will flatten out the Pogo tip quickly with regular use. On the other hand, the Boxwave tip looks and feels solid, and I don’t have the same concern of it wearing out.

After spending time with both, I decided I prefer the Boxwave Capacitive iPad Stylus over the Pogo Sketch. I like the thickness and weight of the Boxwave, and it doesn’t have that cheap feel that the Pogo does. But $25 is a lot to spend. Given the amount of time I will use a stylus and having played with both, I know I would have been happy with the Pogo Sketch. But since I bought both, I will continue using the Boxwave stylus, and I will likely give away the Pogo Sketch at an NSHappyHour or similar event.

Speaking of NSHappyHour, I brought both styluses with me to the July NSHappyHour for others to try out. Jon Lee was kind enough to email me his own review, which I’ve included here. I love his final verdict.

Finger:

Pros: Always available when you need it. If you lose one, there is always another.

Cons: Pen tip is too squishy, and big. Writing by finger is an awkward user experience.

Pogo Sktech

Pros: Tip feels smaller, like you’re drawing with a thin Crayola marker. Using a stylus is familiar as a experience, as compared to finger painting.

Cons: The squishy sponge material makes me afraid that if I press too hard I will scratch the iPad surface with the edge of the ring that holds the sponge. Sponge feels very rippable after continued use.

Boxwave Capacitive iPad Stylus

Pros: Good weight, feels substantial. The tip, being rubber, feels like it could last longer than the Pogo.

Cons: The rubber end is like the bulb end of a turkey baster. And it feels like you’re writing with one. The thicker footprint does not make me feel like I have a high chance of being accurate when I draw. And $20? Really?

Verdict:
Make your own.


ANN: Hey Peanut 1.3 is in the App Store

Thursday, August 26th, 2010

HeyPeanut-1.3-preview2.pngHey Peanut 1.3 is now available in the App Store. The 1.3 update to Hey Peanut includes a new safari theme and all new animal sound effects.

What is Hey Peanut? Hey Peanut is a photo app for toddlers available on iPhone and iPad. Parents add pictures to Hey Peanut and optionally record a message on each picture. Then your 1 to 3 year old can flip through the pictures, touching each one to hear the recorded message. Hey Peanut also includes colorful themes with fun sound effects to entertain your child.

Keep an eye on the @HeyPeanutApp and @WhitePeak Twitter feeds for free promo codes.


Don’t Rely on UIDevice orientation for Rotation

Monday, August 23rd, 2010

Last week I tweeted about having rotation issues with an iPad app I’m working on. This is the second time in recent weeks I’ve encountered rotation issues in an app. In both instances I was using a UIScrollView so I started thinking the UIScrollView was source of my problems. In the most recent instance the UIScrollView contains a UIView that uses a number of CALayer instances for content display.

For those who don’t know, in Mac OS X 10.5 and greater, CALayer has the autoresizingMask property. Unfortunately this property does not exists under iOS, so it’s up to my code to do the resizing CALayers as needed. This is where the rotation issue revealed itself.

As the device is rotated from portrait to landscape, or vice versa, my view must resize and adjust the layout of the CALayers. Because UIView does not receive the rotation notifications I decided to be smart and use the orientation property from UIDevice. So in my view I had code similar to this:

UIInterfaceOrientation interfaceOrientation = [[UIDevice currentDevice] orientation];
if (UIInterfaceOrientationIsLandscape(interfaceOrientation) == YES) {
  // Adjust for landscape.
} else {
  // Adjust for portrait.
}

What I failed to realize, however, is that the property orientation will always return 0 unless orientation notifications are enabled. Here is a quote directly from the Developer Documentation:

“The value of this property always returns 0 unless orientation notifications have been enabled by calling beginGeneratingDeviceOrientationNotifications.”

Doh! Guess I should have RTFM sooner.

Because the orientation property will return 0, sometimes the view in my app would not rotate. But I didn’t know this was the source of the problem at the time.

After banging my head over and over on the wall, I decided to investigate exactly what was happening. I never suspected [[UIDevice currentDevice] orientation] but eventually I noticed it was returning 0. This seemed odd so I checked the Developer Documentation. I wasn’t expecting to learn anything new. Boy, was I wrong. I was surprised when I read the property always returns 0 when orientation notifications are not enabled.

I now knew the source of my rotation problems, and a likely quick fix to the problem would have been to call beginGeneratingDeviceOrientationNotifications, get the device orientation, then call endGeneratingDeviceOrientationNotifications. But this just seemed wrong to me. The better fix, in my opinion, is to rely on the rotation notifications received by the view controller, so that’s exactly what I did.

Now in my particular situation, there are two times I want to resize and layout the CALayers in the UIView. One of those times is when the device is rotated, which is when the view controller receives the willRotateToInterfaceOrientation:duration: message. This was easy to solve. I added an adjustLayoutToInterfaceOrientation: method to my UIView and I call the method inside the UIViewController’s willRotateToInterfaceOrientation:duration: method. For example:

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
                                duration:(NSTimeInterval)duration
{
   [view_ adjustLayoutToInterfaceOrientation:toInterfaceOrientation];
}

The other time my UIView needs to adjust the layout of the CALayers is when the UIScrollView scrolls. I’m using a modified version of Matt Gallagher’s virtual pages in a UIScrollView approach, so the contents of my view changes as the user scrolls. This is where, previously, I was trying to be smart and use the orientation property from UIDevice. But what I really need is the current orientation as received in the most recent call to willRotateToInterfaceOrientation:duration:.

My solution was to add the ivar currentOrientation to my view controller. My view already has a reference to the view controller. I exposed currentOrientation so my view can retrieve the property value. This allowed me to replace the [[UIDevice currentDevice] orientation] code with [controller currentOrientation]. Now the view always knows the current orientation and the app does not need to enable orientation notification in code.

As a result, the first code snippet in this posting changes to:

UIInterfaceOrientation interfaceOrientation = [controller_ currentOrientation];
if (UIInterfaceOrientationIsLandscape(interfaceOrientation) == YES) {
  // Adjust for landscape.
} else {
  // Adjust for portrait.
}

And the willRotateToInterfaceOrientation:duration: implementation changes to:

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
                                duration:(NSTimeInterval)duration
{
   currentOrientation_ = toInterfaceOrientation;
   [view_ adjustLayoutToInterfaceOrientation:toInterfaceOrientation];
}

This has been an eye opener for me, and I now have a new rule of thumb. Never use UIDevice orientation in code that is responsible for the resizing and layouts of subviews and CALayers.


New Safari Theme for Hey Peanut

Saturday, August 21st, 2010

HeyPeanut-1.3-preview2.pngAt long last, a new theme is coming to Hey Peanut. Hey Peanut 1.3 was submitted to Apple today. This update includes a new safari theme for toddlers to enjoy. There is a hippo, giraffe, zebra, and a friendly lion. Also included in this update are all new animal sounds recorded from actual animal.

Previous releases of Hey Peanut used family-made sounds. What do I mean by “family-made” sounds? Well, the animal sounds were recordings of my wife and me attempting to mimic each of the farm animals. The sounds were silly but lacked a certain level of professionalism. Hey Peanut 1.3 will use all new sounds, and this time the animal sounds are the actual sounds from real animals, with one exception. A giraffe doesn’t really make a sound, so in Hey Peanut the giraffe sounds like a giggling kid. Of course, that kid giggling is my son, Rowan, so there is still a family touch in this new release.

Hey Peanut 1.3 should be available for download from the App Store very soon. Meanwhile, keep an eye on the White Peak Software Twitter account, @whitepeak, for promo codes to redeem a free copy of Hey Peanut (U.S. App Store only).