Archive for the ‘IPhone’ Category
How to respond to the IPhone Shake Gesture
The IPhone 3.0 SDK includes support for detecting when a user “Shakes” the IPhone, this is intended to be a usability feature allowing app developers to implement Refresh or Read All functions on shake, wow those crazy guys at Apple really do know how to innovate!
It’s pretty easy to implement all you need to do is register your view controller as the first responder and listen for the motion event.
-(void) viewDidAppear:(BOOL)animated{ [super viewDidAppear:animated]; [self becomeFirstResponder]; }
Once your controller is the First Responder you can receive the motion event like so:
- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event { if (motion == UIEventSubtypeMotionShake) { refresh; } }
This will work beautifully but you will however notice that any views you present over this one will not respond to all touch events, for instance the keyboard will not show when you touch a text field, this is because you need to resign the First Responder before you present the view like so:
- (IBAction)showMyCustomView { [self resignFirstResponder]; [self presentModalViewController:myCustomViewController animated:YES]; }
As you can see this is all pretty easy and the only gotcha is the First Responder stuff, which also is pretty trivial.
Enjoy and please people, Shake Responsibly!
IPhone 3g is not water resistant!
Yesterday evening i spent a couple of hours sitting in my garden reading while the summer evening sun rained down. It was one of those peaceful moments where time seemed to stand still.
This morning when letting the Dog out to do what ever it is she does first thing in the morning, i took a stroll down the garden to reminisce about the night before only to realize that i had left my IPhone 3G on the hammock.
The sun that had blessed us the night before had been replaced by Rain and the IPhone was soaked! Needless to say, it doesn’t switch on any more and I’m gutted!
Fortunately i still have my old IPhone 2G so i can use that, but every time i look at it, it reminds me of my drowned little baby that was only a few months old
Oh well life goes on, I’ll get the insurance company to send me a new one tomorrow
Daily Dose #4
Bourbon Creams and Bananas are not a balanced diet.
Phusion Passenger on Amazon EC2
Some useful stuff relating to Phusion Passenger (mod_rails) on Amazons Elastic Computing Cloud.
Moving from Java to C#
A senior ThoughtWorker talks about his first C# project 10 years after he first tasted the Java bean.
IPhone GUI PSD
Some photoshop goodies for mocking up IPhone UI’s.
Daily Dose #3
More estimating today! Calculating velocity tomorrow… Joy!
Y Combinator’s Demo Day Summer 2008
Some y-combinator startups show of there stuff.
YUI 3 Preview
Personally i prefer ExtJS but more choice in this area is good for all.
AppStore Developer TapTapTap Publishes Sales Figures
Interesting stats from TapTapTap – Makes me think I should building IPhone apps
Daily Dose #1
A few links to get us going…
IPhone Development
iphone-universal
Normalized CSS & HTML framework to develop iPhone webdev applications
C#
Simple REST Client
Some .NET code for consuming RESTful web services.
Rails
Understanding Map and Reduce
Some underused collection functions in Ruby
OS X Utils
Expandrive
Cool app that allows you to mount a sFtp folder.
MarsEdit
Powerful Blog Publishing For Your Mac.
