[iOS] Share extension - Text sharing UI
This CL adds the text sharing UI for the new share extension. Bug: 396326825 Change-Id: Id019c7d90e4dc6adfed437928634d5827416f01d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6343098 Reviewed-by: Olivier Robin <olivierrobin@chromium.org> Commit-Queue: Elmehdi Rahmaoui <erahmaoui@google.com> Cr-Commit-Position: refs/heads/main@{#1431760}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
e33f048404
commit
1c44ce70bc
ios/chrome/share_extension
@ -279,7 +279,14 @@ const CGFloat kShareSheetCornerRadius = 20;
|
||||
- (void)handleText:(id)idText
|
||||
forItem:(NSExtensionItem*)item
|
||||
withError:(NSError*)error {
|
||||
// TODO(crbug.com/396326361): Handle shared text.
|
||||
self.shareText = [[item attributedContentText] string];
|
||||
self.shareItem = item;
|
||||
|
||||
if (self.shareText) {
|
||||
[self displayShareSheet];
|
||||
} else {
|
||||
[self displayErrorView];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)loadElementsFromContext {
|
||||
|
@ -270,8 +270,11 @@ NSString* const kCustomMinimizedDetentIdentifier = @"customMinimizedDetent";
|
||||
}
|
||||
|
||||
- (UIView*)configureSharedTextView {
|
||||
// TODO(crbug.com/396326361): Add text sharing ui configuration.
|
||||
return nil;
|
||||
UILabel* sharedTextLabel = [[UILabel alloc] init];
|
||||
sharedTextLabel.text = self.sharedText;
|
||||
sharedTextLabel.numberOfLines = 0;
|
||||
|
||||
return sharedTextLabel;
|
||||
}
|
||||
|
||||
- (UIImageView*)configureSnapshotView {
|
||||
|
Reference in New Issue
Block a user