TWTRSETweetShareConfiguration Class Reference

Inherits from NSObject
Declared in TWTRSETweetShareConfiguration.h

  accounts

@property (nonatomic, readonly, copy) NSArray<id<TWTRSEAccount> > *accounts

  initiallySelectedAccount

@property (nonatomic, readonly, nullable) id<TWTRSEAccount> initiallySelectedAccount

  initialTweet

@property (nonatomic, readonly, copy, nullable) TWTRSETweet *initialTweet

  geoTagging

@property (nonatomic, readonly, nullable) id<TWTRSEGeoTagging> geoTagging

  autoCompletion

@property (nonatomic, readonly, nullable) id<TWTRSEAutoCompletion> autoCompletion

  cardPreviewProvider

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

  imageDownloader

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

  networking

@property (nonatomic, readonly) id<TWTRSENetworking> networking

  scribe

@property (nullable, nonatomic, readonly) id<TWTRSEScribe> scribe

  wordRangeCalculator

@property (nonatomic, readonly) Class<TWTRSEWordRangeCalculator> wordRangeCalculator

  delegate

@property (nullable, nonatomic, readonly, weak) id<TWTRSETweetShareViewControllerDelegate> delegate

– initWithInitialTweet:accounts:initiallySelectedAccount:geoTagging:autoCompletion:cardPreviewProvider:imageDownloader:localizedResources:networking:twitterText:wordRangeCalculator:scribe:delegate:

(optional): The details of the tweet to prepopulate.

- (instancetype)initWithInitialTweet:(nullable TWTRSETweet *)initialTweet accounts:(NSArray<id<TWTRSEAccount> > *)accounts initiallySelectedAccount:(nullable id<TWTRSEAccount>)initiallySelectedAccount geoTagging:(nullable id<TWTRSEGeoTagging>)geoTagging autoCompletion:(nullable id<TWTRSEAutoCompletion>)autoCompletion cardPreviewProvider:(nullable id<TWTRSECardPreviewProvider>)cardPreviewProvider imageDownloader:(id<TWTRSEImageDownloader>)imageDownloader localizedResources:(Class<TWTRSELocalizedResources>)localizedResources networking:(id<TWTRSENetworking>)networking twitterText:(Class<TwitterTextProtocol>)twitterText wordRangeCalculator:(Class<TWTRSEWordRangeCalculator>)wordRangeCalculator scribe:(nullable id<TWTRSEScribe>)scribe delegate:(id<TWTRSETweetShareViewControllerDelegate>)delegate

Parameters

initialTweet

(optional): The details of the tweet to prepopulate.

accounts

(required): The list of accounts to choose from which to tweet. If empty, the UI will present an alert with an error and not allow to use the composer.

initiallySelectedAccount

(optional): The account to default the selection too. If nil, the first account in accounts is selected initially. If provided, this must be an object in accounts.

geoTagging

(optional): An object that can provide places to geo-tag the tweet. If nil, the location option won’t be present.

autoCompletion

(optional): An object that can provide user and hashtag autoCompletion. If nil, the autoCompletion UI won’t be shown.

cardPreviewProvider

(optional): An object that can provide a card preview image. If nil, the cardPreview UI will rely on the itemProvider to retrieve an image

imageDownloader

(required): An object that can download images (used to retrieve user avatars).

networking

(required): An object that is able to make network requests on behalf of a Twitter user.

twitterText

(required): the instantiator’s version of TwitterText

wordRangeCalculator

(required): the instantiator’s version of code to calculate text ranges on strings

delegate

(required): An object that can respond to lifecycle events of this controller to be able to dismiss it when the user takes action on it.

Declared In

TWTRSETweetShareConfiguration.h

– init

- (instancetype)init