-
-
Notifications
You must be signed in to change notification settings - Fork 53
Can't close modally presented ViewController any more #10
Comments
Hey LucasZL, there is no need to dismiss the STLocationRequestController manually. The STLocationRequestController will dismiss itself when the user tapped the NotNow-Button or accepted or denied the location request. So please give me a code sample how you call the STLocationRequest Screen. Preferred way in Swift, is to use the UIViewController Extension: import STLocationRequest
func showLocationRequest(){
self.showLocationRequestController(
setTitle: "We need your location for some awesome features",
setAllowButtonTitle: "Alright",
setNotNowButtonTitle: "Not now",
setMapViewAlphaValue: 0.9,
setBackgroundViewColor: UIColor.lightGrayColor(),
setDelegate: self)
} Also don't forget to apply to the LocationRequestDelegate if you want to get notified about different states of the STLocationRequestController |
I know thats working fine. Im talking about the VC thats calling showLocationRequest(). I can't close it after showing LocationRequest |
Got it! So it might be the best to give me a code sample of how you present your ViewController and the code inside the ViewController to fix that problem. |
and then call to close the VC. It's working fine if I don't call |
Do you have embedded your ViewController which will be presented modally as you written in a UINavigationController? If not please change your closeClicked function from @IBAction func closeClicked(sender: AnyObject) {
self.navigationController?.dismissViewControllerAnimated(true, completion: nil)
} to @IBAction func closeClicked(sender: AnyObject) {
self.dismissViewControllerAnimated(true, completion: nil)
} |
Yes I have |
@LucasZL is your request still a current problem or did you found a solution for your problem? |
Until now I have used STLocationRequest in a "normal" ViewController.
The only thing I changed was presenting the VC modally but now I can't close the VC itself anymore after showing the LocationRequest.
I use
self.navigationController?.dismissViewControllerAnimated(true, completion: nil)
for closing and it's working everywhere fine but not in the VC with the LocationRequest...
The text was updated successfully, but these errors were encountered: