Skip to content

Instantly share code, notes, and snippets.

@pmark
Created December 5, 2012 22:38
Show Gist options
  • Save pmark/4220147 to your computer and use it in GitHub Desktop.
Save pmark/4220147 to your computer and use it in GitHub Desktop.
Configuring a 3DAR callout view
@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