TWTRSETweetAttachmentCocoaItemProvider Class Reference

Inherits from NSObject
Conforms to TWTRSETweetAttachment
Declared in TWTRSETweetAttachment.h

Overview

An attachment that is able to render the contents of an NSItemProvider (like those from an iOS share extension).

– initWithTitle:itemProvider:cardPreviewProvider:imageDownloader:

A title to render alongside the attachment (optional)

- (instancetype)initWithTitle:(nullable NSString *)title itemProvider:(NSItemProvider *)itemProvider cardPreviewProvider:(nullable id<TWTRSECardPreviewProvider>)cardPreviewProvider imageDownloader:(nullable id<TWTRSEImageDownloader>)imageDownloader

Parameters

title

A title to render alongside the attachment (optional)

itemProvider

(required) The item provider that will be loaded to render this attachment. Only the kUTTypeURL and kUTTypeFileURL UTI types are currenly supported. For kUTTypeText, consider adding the text to the text of the initialTweet property.

Declared In

TWTRSETweetAttachment.h

  title

@property (nonatomic, readonly, copy, nullable) NSString *title

  itemProvider

@property (nonatomic, readonly, copy) NSItemProvider *itemProvider

  cardPreviewProvider

@property (nonatomic, readonly, copy, nullable) id<TWTRSECardPreviewProvider> cardPreviewProvider

  imageDownloader

@property (nonatomic, readonly, copy, nullable) id<TWTRSEImageDownloader> imageDownloader