Files
MessageKit/Sources/LocationMessageDisplayDelegate.swift
T
etoledom 3c864f9bdf Removed unnecessary locationMessagesDisplayDelegate from messagesCollectionView
Added defer {} to always exit `setMapSnaphotImage` stopping activity indicator
2017-09-23 10:42:10 -03:00

31 lines
1.1 KiB
Swift

//
// LocationMessageDisplayDelegate.swift
// MessageKit
//
// Created by Eduardo Toledo on 9/22/17.
// Copyright © 2017 MessageKit. All rights reserved.
//
import Foundation
import MapKit
public protocol LocationMessageDisplayDelegate: MessagesDisplayDelegate {
func snapshotOptionsForLocation(message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> LocationMessageSnapshotOptions
func annotationViewForLocation(message: MessageType, at indexPath: IndexPath, in messageCollectionView: MessagesCollectionView) -> MKAnnotationView
}
public extension LocationMessageDisplayDelegate {
func snapshotOptionsForLocation(message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> LocationMessageSnapshotOptions {
return LocationMessageSnapshotOptions()
}
func annotationViewForLocation(message: MessageType, at indexPath: IndexPath, in messageCollectionView: MessagesCollectionView) -> MKAnnotationView {
return MKPinAnnotationView(annotation: nil, reuseIdentifier: nil)
}
}