ios_google_places_autocomplete icon indicating copy to clipboard operation
ios_google_places_autocomplete copied to clipboard

Present the xib from a UITableViewCell

Open perteadrian opened this issue 7 years ago • 0 comments

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: screen shot 2016-08-31 at 15 50 25 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)
    }
}

perteadrian avatar Aug 31 '16 12:08 perteadrian