How to open a specific View controller from Today Widget?

I create a simple widget that contains one button, this button should - when pressed - open a specific view controller in my respective application.

The only solution I was thinking about is to create a URL type that only the initial view controller can open (at least as far as I know).

The following is the code I'm currently using inside the UIButton action:

   var url = NSURL(string: "_my_url_://")
    extensionContext?.openURL(url!, completionHandler: nil)
+4
source share
1 answer

URL ( myapp://) . , myapp://signupform myapp://activities/15. , URL- , . URL VC (), URL- VC .

, URL- . application:openURL:sourceApplication:annotation: (docs), URL-, URL- , .

URL-, , . , , , , - . , , , .

+8

All Articles