With emoji keyboard enabler.
Recently, I released 3 different iOS UI Components on github.
They are
And I haven’t had a chance to talk about them all, but let me show you the first one, which is also my favorite: DDActionHeaderView.
Back to December 2009, that’s almost one year ago, I was struggling to create my first serious iPhone utility app, lots of proof of concept design and user interface experiments ongoing back then. And one of my ideas was to create a new UI component that:

Rapid, is a very important notion for designing utilities on small iOS devices like iPhone or iPod touch. Those little gadgets should launch fast, do things fast, and go away fast.
For example, you don’t want your users to waste time looking at strange icons on the toolbar and trying to figure out (or just by guessing actually) what those icons do. And meanwhile, there’s no much space for you to add description next to the icons.

Icons on toolbar seems to be a simple interface with clear functionality, but things could be worse when you have four or five different looking icons on the toolbar, and the situation gets even worse when each icons are bringing up their own UIActionSheet.
It becomes some kinds of crazy knock’em down games in carnival booths, and you’re not going to win prizes from your users for that.
And DDActionHeaderView is the solution…

The gray circle on the right is called Action Picker, it contains action items. Users can tap to expand that action picker and look for actions that can be executed.

Once users tap the action item icon, the action picker shrinks back to normal, and action executed. So now:
DDActionHeaderView’s variants (e.g. dataSource protocol version) were first used in my iPhone app QR+Emoji, and the version you saw on github is a simplified version that is used in my newly released app: FrostyPlace.

DDActionHeaderView uses Blocks, Quartz 2D, CALayer, CAGradientLayer, CAAnimation and UIGestureRecognizer.


DDActionHeaderView and other two projects are released under MIT License.
Source code and demo are available on github.
Update
Version 3.2 with new sample for iOS 4.2 is available here.
I just pushed some changes to github, and make MapKitDragAndDrop version 3.1:

In version 3.0, when -initWithAnnotation:resuseIdentifier: called, I create annotationView based on the availability of MKAnnotationView’s isDraggable property. If MKAnnotationView can handle isDraggable, I will return the built-in MKPinAnnotationView; if not, I create DDAnnotationView instead, and let it handle the drag/drop functionality.
But here comes one problem: though document said isDraggable only available in iOS 4 and later, iOS 3.2 does has this property (but not enabled). As result, my
self.hasBuiltInDraggingSupport = [[MKAnnotationView class] instancesRespondToSelector:NSSelectorFromString(@"isDraggable")];
will return YES on iOS 3.2, and create the non-draggble MKPinAnnotationView back.
So one of the quickest solution is to check system version number instead of using -instancesRespondToSelect: to decide if we need to use DDAnnotationView:
self.hasBuiltInDraggingSupport = [[UIDevice currentDevice] systemVersion] compare:@"4.0" options:NSNumericSearch] != NSOrderedAscending;
That’s one of the changes in version 3.1.
As for synthesized by default, I previously enabled Objective-C 2.0 Non-fragile ABI for using the “synthesized by default” feature in MapKitDragAndDrop 3.0, turns out it a pain in the butt for many developers, even Apple removed these options in latest Xcode 4 preview.
And my thoughts on ivar changed: If you really want to get rid of ivar in Objective-C, use NSManagedObject. That’s more likely to be an ideal solution to you, even though you get other messy problems. Keep using ivar is not a bad idea after all, that’s how I told myself.
So, after considering, I changed my mind, no more synthesized by default in this version, and you are allowed to use either GCC or LLVM Compiler with it now.
Source code is licensed under MIT license. You can download it from github.
Update
Version 3.2 with new sample for iOS 4.2 is available here.
With iOS 4 MapKit built-in draggable support, MapKitDragAndDrop now goes to version 3.
MapKitDragAndDrop is designed to bring drag and drop support to MapKit on iPhone platform, with just one single lightweight DDAnnotation and DDAnnotationView, users are able to drag and drop annotation pin and get the new coordinate.
For real world example, you can check out my app: QR+Emoji
In version 3, the whole project had shifted to modern runtime, using Objective-C 2.0 ABI and LLVM 1.5 compiler. So you will have smaller and faster binary that runs on both iOS 4 and ealier iPhone OS 3.1.x/3.2 at the same time.
Project file (.xcodeproj) needs to:
-Xclang here means “pass argument to the clang compiler,” and the argument is -fobjc-nonfragile-abi2. So you should add ‘-Xclang -fobjc-nonfragile-abi2’ into $OTHER_CFLAGS.
For more details, check “-Xclang -fobjc-nonfragile-abi2” is single flag with one argument.

Source code is licensed under MIT license.
You can download it from github.
loading…