Skip to content

@wndxlori /beer_map_controller.rb
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Custom image for MKAnnotationView in RubyMotion
ViewIdentifier = 'ViewIdentifier'
def mapView(mapView, viewForAnnotation:beer)
if view = mapView.dequeueReusableAnnotationViewWithIdentifier(ViewIdentifier)
view.annotation = beer
else
view = MKAnnotationView.alloc.initWithAnnotation(beer, reuseIdentifier:ViewIdentifier)
view.image = UIImage.imageNamed('signpost.png')
view.canShowCallout = true
# view.animatesDrop = true
button = UIButton.buttonWithType(UIButtonTypeDetailDisclosure)
button.addTarget(self, action: :'showDetails:', forControlEvents:UIControlEventTouchUpInside)
view.rightCalloutAccessoryView = button
end
view
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.