问题
According to the UIActivity Class documentation it is possible to add AVAsset
objects as a datasource to UIActivityTypePostToFacebook
activity. Does it mean that we can post videos using the standard UIActivityTypePostToFacebook
activity type? If not then what kind of items can I post using AVAsset
activity item?
回答1:
Well.. According to UIActivity.h
UIKIT_EXTERN NSString *const UIActivityTypePostToFacebook NS_AVAILABLE_IOS(6_0); // text, images, URLs
UIKIT_EXTERN NSString *const UIActivityTypePostToTwitter NS_AVAILABLE_IOS(6_0); // text, images, URLs
UIKIT_EXTERN NSString *const UIActivityTypePostToWeibo NS_AVAILABLE_IOS(6_0); // text, images, URLs
UIKIT_EXTERN NSString *const UIActivityTypeMessage NS_AVAILABLE_IOS(6_0); // text
UIKIT_EXTERN NSString *const UIActivityTypeMail NS_AVAILABLE_IOS(6_0); // text, image, file:// URLs
UIKIT_EXTERN NSString *const UIActivityTypePrint NS_AVAILABLE_IOS(6_0); // image, NSData, file:// URL, UIPrintPageRenderer, UIPrintFormatter, UIPrintInfo
UIKIT_EXTERN NSString *const UIActivityTypeCopyToPasteboard NS_AVAILABLE_IOS(6_0); // text, image, NSURL, UIColor, NSDictionary
UIKIT_EXTERN NSString *const UIActivityTypeAssignToContact NS_AVAILABLE_IOS(6_0); // image
UIKIT_EXTERN NSString *const UIActivityTypeSaveToCameraRoll NS_AVAILABLE_IOS(6_0); // image, video
videos are mentioned only in comments for UIActivityTypeSaveToCameraRoll
. This means that the only images can be added as AVAsset instances using these standard activity types.
来源:https://stackoverflow.com/questions/12866012/uiactivity-and-avasset-data-type-usage