Created
December 5, 2012 22:38
-
-
Save pmark/4220147 to your computer and use it in GitHub Desktop.
Configuring a 3DAR callout view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface MainViewController () | |
@property (nonatomic, strong) SM3DARCalloutView *calloutView; | |
@end | |
// | |
// This method should appear in your 3DAR delegate class. | |
// | |
- (SM3DARCalloutView*) sm3dar:(SM3DARController*)sm3dar calloutViewForPoint:(SM3DARPoint*)point | |
{ | |
if (self.calloutView == nil) | |
{ | |
// A blue disclosure button will be visible if the callout view has an SM3DARCalloutViewDelegate. | |
// Set the delegate to nil to hide the disclosure button. | |
self.calloutView = [[[SM3DARMorphingCalloutView alloc] initWithDelegate:self] autorelease]; | |
self.calloutView.centerOffset = CGPointMake(0, 50); | |
NSLog(@"Initialized new callout view of type '%@'", [self.calloutView class]); | |
} | |
return (SM3DARCalloutView*)self.calloutView; | |
} | |
- (void) calloutViewWasTappedForPoint:(SM3DARPoint*)point | |
{ | |
NSLog(@"Callout view tapped: %@", point.title); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment