Game Kit Preso - Voices That Matter:iPhone
Voices that Matter talk finished, was great fun. Here are the slides.
The source code for Disk Smash (the demo code from the talk) is available here
Permalink Add A CommentBoulder Developer Day - Core Animation
Here is my very brief introduction to Core Animation on the iPhone.
And you can find the source here; Photo Search source code.
Permalink Add A CommentCustom Views During Text Entry
The app I'm currently working on requires a custom view to be taking all the visible are between the search bar and the keyboard. So I spent a bit of time experimenting and came up with this little recipe that might be useful to you.
The first thing you need to do is register to be notified when the keyboard becomes active. This code makes that happen.
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWillShow:)
name:UIKeyboardWillShowNotification
object:nil];
I placed this code into my view controller's viewDidLoad method but a different location might be more appropriate for you.
Then in my keyboardWillShow: method I calculate the visible space and make that the frame of my overlay view. Like this;
- (void)keyboardWillShow:(NSNotification *)notification {
if(nil != self.view.window){
CGRect appFrame = [[UIScreen mainScreen] applicationFrame];
CGRect keyboardBounds = [[[notification userInfo] valueForKey:UIKeyboardBoundsUserInfoKey] CGRectValue];
CGRect searchBounds = [self.searchBar bounds];
CGFloat height = CGRectGetHeight(appFrame) - CGRectGetHeight(keyboardBounds) - CGRectGetHeight(searchBounds);
CGRect visibleBounds = CGRectMake(CGRectGetMinX(appFrame),
CGRectGetMinY(appFrame) + CGRectGetHeight(searchBounds),
CGRectGetWidth(appFrame),
height);
self.overlay.frame = visibleBounds;
}
}
This works for me because my overlay view becomes a subview of view controller's view. If your view hierarchy is different you might need to do some different math.
Now with this view in place I can process a single tap as a cancel. You could do just about anything here though.
Happy coding!
Permalink 3 Comments - Add YoursiPhone SDK Development In Print (W00T!)
If you follow me on twitter you've already hear. But I'm still so excited that I can't keep from posting here. The iPhone SDK book is finally in print. Yippy!
Permalink 1 Comment - Add Yours


