commit | author | age
|
655e66
|
1 |
/* |
H |
2 |
* Copyright (C) 2017 Twitter, Inc. |
|
3 |
* |
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 |
* you may not use this file except in compliance with the License. |
|
6 |
* You may obtain a copy of the License at |
|
7 |
* |
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
|
9 |
* |
|
10 |
* Unless required by applicable law or agreed to in writing, software |
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
* See the License for the specific language governing permissions and |
|
14 |
* limitations under the License. |
|
15 |
* |
|
16 |
*/ |
a0a843
|
17 |
|
H |
18 |
#import <UIKit/UIKit.h> |
655e66
|
19 |
#import "TWTRVideoPlaybackState.h" |
a0a843
|
20 |
|
H |
21 |
@class TWTRSession; |
|
22 |
@class TWTRTweet; |
|
23 |
@class TWTRTweetView; |
|
24 |
@class TWTRUser; |
|
25 |
@protocol TWTRSessionStore; |
|
26 |
|
|
27 |
NS_ASSUME_NONNULL_BEGIN |
|
28 |
|
|
29 |
typedef void (^TWTRAuthenticationCompletionHandler)(id<TWTRSessionStore> sessionStore, NSString *userID); |
|
30 |
|
|
31 |
/** |
|
32 |
Delegate for `TWTRTweetView` to receive updates on the user interacting with this particular Tweet view. |
|
33 |
|
|
34 |
// Create the tweet view |
|
35 |
TWTRTweetView *tweetView = [[TWTRTweetView alloc] initWithTweet:tweet]; |
|
36 |
// Set the delegate |
|
37 |
tweetView.delegate = self; |
|
38 |
*/ |
|
39 |
@protocol TWTRTweetViewDelegate <NSObject> |
|
40 |
|
|
41 |
@optional |
|
42 |
|
|
43 |
/** |
|
44 |
* The tweet view image was tapped. |
|
45 |
* |
|
46 |
* @param tweetView The Tweet view that was tapped. |
|
47 |
* @param image The exact UIImage data shown by the Tweet view. |
|
48 |
* @param imageURL The full URL of the image being shown. |
|
49 |
*/ |
|
50 |
- (void)tweetView:(TWTRTweetView *)tweetView didTapImage:(UIImage *)image withURL:(NSURL *)imageURL; |
|
51 |
|
|
52 |
/** |
|
53 |
* The Tweet view video was tapped. |
|
54 |
* If this method is not implemented a video player will be presented. |
|
55 |
* |
|
56 |
* @param tweetView The Tweet view that was tapped. |
|
57 |
* @param videoURL The full URL of the video being shown. |
|
58 |
*/ |
|
59 |
- (void)tweetView:(TWTRTweetView *)tweetView didTapVideoWithURL:(NSURL *)videoURL; |
|
60 |
|
|
61 |
/** |
|
62 |
* A URL in the text of a tweet was tapped. Implement to show your own webview rather than opening Safari. |
|
63 |
* |
|
64 |
* @param tweetView The Tweet view that was tapped. |
|
65 |
* @param url The URL that was tapped. |
|
66 |
*/ |
|
67 |
- (void)tweetView:(TWTRTweetView *)tweetView didTapURL:(NSURL *)url; |
|
68 |
|
|
69 |
/** |
|
70 |
* Called when the user's profile image is tapped. |
|
71 |
* If this method is not implemented, the default behavior is to deep link into Twitter application or twitter.com in a webview. |
|
72 |
* |
|
73 |
* @param tweetView The Tweet view that was tapped. |
|
74 |
* @param user The Twitter user. |
|
75 |
*/ |
|
76 |
- (void)tweetView:(TWTRTweetView *)tweetView didTapProfileImageForUser:(TWTRUser *)user; |
|
77 |
|
|
78 |
/** |
|
79 |
* Called when the Tweet is tapped. |
|
80 |
* If this method is not implemented, the default behavior is to deep link into Twitter application or twitter.com in a webview. |
|
81 |
* |
|
82 |
* @param tweetView The Tweet view that was tapped. |
|
83 |
* @param tweet The Tweet that user tapped. |
|
84 |
*/ |
|
85 |
- (void)tweetView:(TWTRTweetView *)tweetView didTapTweet:(TWTRTweet *)tweet; |
|
86 |
|
655e66
|
87 |
/** |
H |
88 |
* Called when video in the Tweet changes its state. |
|
89 |
* |
|
90 |
* @param tweetView The Tweet view that was tapped. |
|
91 |
* @param newState The state of the video. (TWTRVideoPlaybackStatePaused, TWTRVideoPlaybackStatePlaying, TWTRVideoPlaybackStateCompleted) |
|
92 |
*/ |
|
93 |
- (void)tweetView:(TWTRTweetView *)tweetView didChangePlaybackState:(TWTRVideoPlaybackState)newState; |
|
94 |
|
a0a843
|
95 |
@end |
H |
96 |
|
|
97 |
NS_ASSUME_NONNULL_END |