ios4
UIActionSheet on iPad is not showing cancel button
iPads have some special rules about action sheets and their cancel buttons, depending on where you are displaying it from: You can present an action sheet from a toolbar, tab bar, button bar item, or from a view. This class takes the starting view and current platform into account when determining how to present the … Read more
iOS 4: Remote controls for background audio
The documentation examples are a bit misleading, but there is no need to subclass anything anywhere. The correct place to put remoteControlReceivedWithEvent: is in the application delegate, as it remains in the responder chain regardless of whether the app is in the foreground or not. Also the begin/end receiving remote control events should be based … Read more
How to capture Tap gesture on MKMapView
You can use a UIGestureRecognizer to detect touches on the map view. Instead of a single tap, however, I would suggest looking for a double tap (UITapGestureRecognizer) or a long press (UILongPressGestureRecognizer). A single tap might interfere with the user trying to single tap on the pin or callout itself. In the place where you … Read more
How to #define an NSString for global use?
If you’re just concatenating strings, you can use compile time string concatenation: #ifdef DEBUG #define kAPIEndpointHost @”http://example.dev” #else #define kAPIEndpointHost @”http://www.example.com” #endif #define kAPIEndpointLatest (kAPIEndpointHost @”/api/latest_content”) #define kAPIEndpointMostPopular (kAPIEndpointHost @”/api/most_popular”)
How do you get implicit dependencies to work with workspaces in Xcode 4?
I have just spent the best part of two days building and rebuilding our project, struggling with just this very issue. Whilst I now have a project that builds and links correctly AND has working codesense I am not 100% happy with one of the steps as it seems to be a bit of a … Read more