iOS: Is it possible to call an external view controller, same like calling an external activity in Android?

StackOverflow https://stackoverflow.com/questions/22455469

  •  15-06-2023
  •  | 
  •  

Pregunta

In Android, I can call an external activity (an activity in Android is similiar to a view controller in iOS), for example the "Add event" activity of the pre-installed calendar app from my app, have the user complete the external activity and return to my app to where he left of.

I need to give my user the feature to create an event in my app, but I would prefer, that he is presented with the default calendar app's "Add event" screen, instead of creating my own UI for that.

Is there a similiar mechanism in iOS?

¿Fue útil?

Solución

Yes. Refer to Calendar and Reminders Programming Guide. The link provided takes you right to the section which talks about UIs Apple provides to make and edit events.

Otros consejos

you need to now the url schemes of external applications to open them:

here is an example:

NSString *urlString= @"glassbutton://com.yourcompany.glassbutton";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString]];

How to use [[UIApplication sharedApplication] openURL:] open other app?

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top