Skip to content

Present the xib from a UITableViewCell #43

Open
@perteadrian

Description

@perteadrian

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)
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions