Bearbeiten

Freigeben über


PHPhotoLibrary.RequestAuthorizationAsync Method

Definition

Asynchronously shows, if necessary, a permissions dialog allowing the user to allow or deny the application access to the photo library.

public static System.Threading.Tasks.Task<Photos.PHAuthorizationStatus> RequestAuthorizationAsync ();
static member RequestAuthorizationAsync : unit -> System.Threading.Tasks.Task<Photos.PHAuthorizationStatus>

Returns

A task that represents the asynchronous RequestAuthorization operation. The value of the TResult parameter is of type System.Action<Photos.PHAuthorizationStatus>.

Remarks

The RequestAuthorizationAsync method is suitable to be used with C# async by returning control to the caller with a Task representing the operation.

The handler is called with the new PHAuthorizationStatus. Note that the handler is likely to be called on a background thread and updates to the user interface must be done with InvokeOnMainThread(Selector, NSObject).

Applies to