diff --git a/iOS/Article/ImageViewController.swift b/iOS/Article/ImageViewController.swift index d837b4d4b..acd572a13 100644 --- a/iOS/Article/ImageViewController.swift +++ b/iOS/Article/ImageViewController.swift @@ -12,8 +12,10 @@ class ImageViewController: UIViewController { @IBOutlet weak var shareButton: UIButton! @IBOutlet weak var imageScrollView: ImageScrollView! + @IBOutlet weak var titleLabel: UILabel! var image: UIImage! + var imageTitle: String? var zoomedFrame: CGRect { return imageScrollView.zoomedFrame } @@ -26,6 +28,8 @@ class ImageViewController: UIViewController { imageScrollView.imageContentMode = .aspectFit imageScrollView.initialOffset = .center imageScrollView.display(image: image) + + titleLabel.text = imageTitle ?? "" } override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { diff --git a/iOS/Article/WebViewController.swift b/iOS/Article/WebViewController.swift index 14383460c..42148679a 100644 --- a/iOS/Article/WebViewController.swift +++ b/iOS/Article/WebViewController.swift @@ -448,6 +448,7 @@ private struct ImageClickMessage: Codable { let y: Float let width: Float let height: Float + let imageTitle: String? let imageURL: String } @@ -497,7 +498,7 @@ private extension WebViewController { transition.originImage = image - coordinator.showFullScreenImage(image: image, transitioningDelegate: self) + coordinator.showFullScreenImage(image: image, imageTitle: clickMessage.imageTitle, transitioningDelegate: self) } } diff --git a/iOS/Base.lproj/Main.storyboard b/iOS/Base.lproj/Main.storyboard index 458cc26a2..c5e435a59 100644 --- a/iOS/Base.lproj/Main.storyboard +++ b/iOS/Base.lproj/Main.storyboard @@ -214,6 +214,12 @@ +