Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Present the xib from a UITableViewCell #43

Open
perteadrian opened this issue Aug 31, 2016 · 0 comments
Open

Present the xib from a UITableViewCell #43

perteadrian opened this issue Aug 31, 2016 · 0 comments

Comments

@perteadrian
Copy link

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)
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant