ios_google_places_autocomplete
ios_google_places_autocomplete copied to clipboard
Present the xib from a UITableViewCell
Hi. I want to present the view directly when the users taps on a UITableViewCell.(Not presenting an UIViewController that presents the xib. like this the animation seems to be broken.)My UITableView is in a NavigationBar so if I can push the view instead of o modal show so I can have a back buttin instead of the close one.
This is what I have in my storyboard:
And this is the code:
import UIKit
class GPAViewController: GooglePlacesAutocomplete {
override func viewDidLoad() {
super.viewDidLoad()
self.placeDelegate = self
GPAViewController(apiKey: "MY API Key", placeType: .Cities)
}
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
}
}
extension GPAViewController: GooglePlacesAutocompleteDelegate {
func placeSelected(place: Place) {
print(place)
let main = stb.instantiateViewControllerWithIdentifier("Menu")
presentViewController(main, animated: true, completion: nil)
}
func placeViewClosed() {
dismissViewControllerAnimated(false, completion: nil)
}
}