2

Just for curiosity, how apple implement UIActivityViewController, as the UIModalPresentationStyle of UIActivityViewController is popover, and in the doc, it says In a horizontally compact environment, this option behaves the same as fullScreen., but obviously, the UIActivityViewController is not in full screen. How can apple implement this, does apple use some private behaviors for this ?

I know How to use UIActivityViewController, my question is how apple implement UIActivityViewController.

enter image description here enter image description here

JIE WANG
  • 1,875
  • 1
  • 17
  • 27
  • you mean you need to show activityIndicator in full screen.? – Abhirajsinh Thakore Apr 18 '18 at 09:44
  • @AbhirajsinhThakore no, it's UIActivityViewController, not activityIndicator, I don't understand how to implement this. – JIE WANG Apr 18 '18 at 09:45
  • 3
    @Nitish it is not duplicate question. You should read it before flag – Prashant Tukadiya Apr 18 '18 at 09:48
  • @PrashantTukadiya : Could you kindly help me come closer to the requirement then ? – Nitish Apr 18 '18 at 09:50
  • @Nitish **Just for curiosity, how apple implement UIActivityViewController** And check your flagged answer – Prashant Tukadiya Apr 18 '18 at 09:51
  • @Nitish My question is not about how to use UIActivityViewController, it's about how apple implement UIActivityViewController, how I can create a custom view controller like UIActivityViewController. – JIE WANG Apr 18 '18 at 09:52
  • For me it doesn't seems that he is asking how to share text or image with ActivityViewcontroller does he ? @Nitish – Prashant Tukadiya Apr 18 '18 at 09:52
  • @PrashantTukadiya : Sorry I didn't get that. **And check your flagged answer**. Which answer ? – Nitish Apr 18 '18 at 09:52
  • @Nitish I mean to say https://stackoverflow.com/questions/35931946/basic-example-for-sharing-text-or-image-with-uiactivityviewcontroller-in-swift is not answer of this question both are different – Prashant Tukadiya Apr 18 '18 at 09:53
  • @PrashantTukadiya : Then please clearly tag the link instead of just posting it as unclear text. – Nitish Apr 18 '18 at 09:54
  • @JIEWANG : My apologies then. Will retract my close vote. – Nitish Apr 18 '18 at 09:54
  • @JIEWANG It is simple to implement like this. You can create view controller with same controls with transparent background and present it with custom animation – Prashant Tukadiya Apr 18 '18 at 09:56
  • @PrashantTukadiya yes, it's easy to do if we use custom, but what UIActivityViewController do is it's use `popover` as UIModalPresentationStyle. – JIE WANG Apr 18 '18 at 09:58
  • @JIEWANG There are many sample on github for how to make something like this. For example, you can check https://github.com/fergusding/iOS-Custom-ActionSheet. It's about custom action sheet but it shows you how to create something like `UIActivityViewController` – trungduc Apr 18 '18 at 10:14
  • @JIEWANG A `blackOverlayView` + `aView`. `aView` is a main white `actionSheet` and you can use `UICollectionView` to showing the options and it can horizontally scroll as well. – TheTiger Apr 18 '18 at 10:16

0 Answers0