-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/1260 Detecting and Cleaning Galleries #8119
Closed
autojeff
wants to merge
16
commits into
wordpress-mobile:develop
from
autojeff:feature/1206-add-gallery
Closed
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
9d73e2a
remove deprecated characters.count, create scanner and regex for dete…
autojeff c7335aa
fix whitespace issues
autojeff 8ad922e
new WPRichTextGallery, displays inline uicollectionview for a gallery…
autojeff 975fb9b
new pageview controller for zoomed gallery, changes to wpimageviewcon…
autojeff 9f94aca
clean up files/code no longer needed
autojeff 23b4c60
clean up whitespace
autojeff 880fff1
gallery caption and page label
autojeff 5f28c6f
clean up, work on gallery sizing
autojeff ef22dcf
run autocorrect, source credit
autojeff 0298a00
corrections from code review, refractoring, add support for alt title…
autojeff bdd8e66
added gesture to flingable to make it work with uipageviewcontroller …
autojeff 6128bb3
clean up code
autojeff 88d5b26
fix gallery padding
autojeff d92c1a4
remove index from wpimageviewcontroller
autojeff 1affd4b
remove index usage from WPImageViewController, clean up code, add dic…
autojeff 3225d36
clean up whitespace/autocorrect
autojeff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import UIKit | ||
|
||
class ReaderGalleryCell: UICollectionViewCell { | ||
|
||
@IBOutlet weak var galleryImageView: UIImageView! | ||
@IBOutlet weak var loadingIndicator: UIActivityIndicatorView! | ||
|
||
} |
47 changes: 47 additions & 0 deletions
47
WordPress/Classes/ViewRelated/Reader/ReaderGalleryCell.xib
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> | ||
<device id="retina4_7" orientation="portrait"> | ||
<adaptation id="fullscreen"/> | ||
</device> | ||
<dependencies> | ||
<deployment identifier="iOS"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/> | ||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<objects> | ||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> | ||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="ReaderGalleryCell" customModule="WordPress" customModuleProvider="target"> | ||
<rect key="frame" x="0.0" y="0.0" width="251" height="211"/> | ||
<autoresizingMask key="autoresizingMask"/> | ||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> | ||
<rect key="frame" x="0.0" y="0.0" width="251" height="211"/> | ||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
<subviews> | ||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Ajo-bT-AZE"> | ||
<rect key="frame" x="0.0" y="0.0" width="251" height="211"/> | ||
</imageView> | ||
<activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="cAa-GN-Pga"> | ||
<rect key="frame" x="115" y="95" width="20" height="20"/> | ||
</activityIndicatorView> | ||
</subviews> | ||
</view> | ||
<constraints> | ||
<constraint firstItem="Ajo-bT-AZE" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="1UW-mN-bJP"/> | ||
<constraint firstItem="cAa-GN-Pga" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="78G-L0-ECS"/> | ||
<constraint firstAttribute="bottom" secondItem="Ajo-bT-AZE" secondAttribute="bottom" id="B4f-2v-67f"/> | ||
<constraint firstItem="Ajo-bT-AZE" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="UPS-xN-kZ3"/> | ||
<constraint firstItem="cAa-GN-Pga" firstAttribute="centerY" secondItem="gTV-IL-0wX" secondAttribute="centerY" id="qBz-yF-5zI"/> | ||
<constraint firstAttribute="trailing" secondItem="Ajo-bT-AZE" secondAttribute="trailing" id="sJw-gb-Bah"/> | ||
</constraints> | ||
<viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/> | ||
<size key="customSize" width="251" height="211"/> | ||
<connections> | ||
<outlet property="galleryImageView" destination="Ajo-bT-AZE" id="COb-J9-HCW"/> | ||
<outlet property="loadingIndicator" destination="cAa-GN-Pga" id="urp-z1-VwJ"/> | ||
</connections> | ||
<point key="canvasLocation" x="31" y="-8"/> | ||
</collectionViewCell> | ||
</objects> | ||
</document> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second parameter name here feels slightly confusing, I think.
didReceiveGalleryAction
doesn't really explain what the parameter contains, and the inner name isimage
but it looks like it contains an array of images (plural)? How aboutdidReceiveGalleryActionWithImages images: [WPTextAttachment]
?