문제

How could I call an action after the UIActivityViewController is dismissed? For example, if I wanted to change a piece of text after the user dismisses the UIActivityViewController.

Thanks Everyone!

도움이 되었습니까?

해결책

Use its completion handler property.

From Apple's documentation:

completion handler

The completion handler to execute after the activity view controller is dismissed. @property(nonatomic,copy) UIActivityViewControllerCompletionHandler completionHandler Discussion When the user-selected service finishes operating on the data, or when the user dismisses the view controller, the view controller executes this completion handler to let your app know the final result of the operation. Availability Available in iOS 6.0 and later. Declared In UIActivityViewController.h

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top