Skip to content

Commit 47cf6c2

Browse files
committed
Merge pull request #19 from MailOnline/ka/Gallery
Gallery
2 parents 3f5feb9 + 4752f81 commit 47cf6c2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+2525
-253
lines changed

.travis.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
osx_image: xcode7.1
1+
osx_image: xcode7.3
22
language: objective-c
33

44
script:
5-
- xctool -project ImageViewer.xcodeproj -scheme ImageViewer -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=9.1,name=iPhone 6' ONLY_ACTIVE_ARCH=NO clean build
6-
- xctool -project ImageViewer.xcodeproj -scheme ImageViewer -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=8.4,name=iPhone 6' ONLY_ACTIVE_ARCH=NO clean build
7-
8-
before_install:
9-
- brew update
10-
- brew uninstall xctool && brew install --HEAD xctool
5+
- set -o pipefail
6+
- xcodebuild build -scheme ImageViewer -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 6s" | xcpretty -c
4.2 MB
Loading
4.2 MB
Loading
4.2 MB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "1-3.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "1.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "1-2.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}
2.04 MB
Loading
2.04 MB
Loading
2.04 MB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "2.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "2-1.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "2-2.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}
263 KB
Loading
263 KB
Loading
263 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "3-1.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "3.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "3-2.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}
2.32 MB
Loading
2.32 MB
Loading
2.32 MB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "4.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "4-1.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "4-2.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}
1.27 MB
Loading
1.27 MB
Loading
1.27 MB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "5.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "5-1.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "5-2.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}
254 KB
Loading
254 KB
Loading
254 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "6.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "6-1.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "6-2.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}
456 KB
Loading
456 KB
Loading
456 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "7.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "7-1.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "7-2.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}
702 KB
Loading
702 KB
Loading
702 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "8.jpg",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "8-1.jpg",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "8-2.jpg",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}

Example/Assets.xcassets/AppIcon.appiconset/Contents.json

+5
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@
5959
"idiom" : "ipad",
6060
"size" : "76x76",
6161
"scale" : "2x"
62+
},
63+
{
64+
"idiom" : "ipad",
65+
"size" : "83.5x83.5",
66+
"scale" : "2x"
6267
}
6368
],
6469
"info" : {

Example/Base.lproj/LaunchScreen.storyboard

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
33
<dependencies>
44
<deployment identifier="iOS"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
66
</dependencies>
77
<scenes>
88
<!--View Controller-->
@@ -16,7 +16,6 @@
1616
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
1717
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
1818
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
19-
<animations/>
2019
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
2120
</view>
2221
</viewController>

Example/Base.lproj/Main.storyboard

+77-35
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
33
<dependencies>
44
<deployment identifier="iOS"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
66
</dependencies>
77
<scenes>
88
<!--View Controller-->
@@ -17,57 +17,99 @@
1717
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
1818
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
1919
<subviews>
20-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Jdg-OI-jGr">
21-
<rect key="frame" x="172" y="20" width="256" height="144"/>
22-
<constraints>
23-
<constraint firstAttribute="width" constant="256" id="cR1-Av-9Wf"/>
24-
<constraint firstAttribute="height" constant="144" id="u0n-uo-eUP"/>
25-
</constraints>
26-
<state key="normal" title="Button" image="image_small"/>
20+
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Asb-C9-sGn">
21+
<rect key="frame" x="20" y="141" width="86" height="54"/>
22+
<state key="normal" backgroundImage="0"/>
2723
<connections>
28-
<action selector="showViewer:" destination="BYZ-38-t0r" eventType="touchUpInside" id="e6g-m3-fsn"/>
24+
<action selector="showGalleryImageViewer:" destination="BYZ-38-t0r" eventType="touchUpInside" id="qGK-lk-XgN"/>
2925
</connections>
3026
</button>
31-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="msT-C2-wTG">
32-
<rect key="frame" x="172" y="436" width="256" height="144"/>
33-
<constraints>
34-
<constraint firstAttribute="height" constant="144" id="A5O-Ul-Lz1"/>
35-
<constraint firstAttribute="width" constant="256" id="Wxz-UV-6ts"/>
36-
</constraints>
37-
<state key="normal" title="Button" image="image_small"/>
27+
<button opaque="NO" tag="1" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vjF-Ww-f3O">
28+
<rect key="frame" x="20" y="203" width="68" height="38"/>
29+
<state key="normal" backgroundImage="1"/>
3830
<connections>
39-
<action selector="showViewer:" destination="BYZ-38-t0r" eventType="touchUpInside" id="ahi-4i-mt8"/>
31+
<action selector="showGalleryImageViewer:" destination="BYZ-38-t0r" eventType="touchUpInside" id="p3L-rK-q6l"/>
4032
</connections>
4133
</button>
42-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Afc-5R-dCh">
43-
<rect key="frame" x="172" y="234" width="256" height="144"/>
44-
<constraints>
45-
<constraint firstAttribute="height" constant="144" id="6Dl-NX-09W"/>
46-
<constraint firstAttribute="width" constant="256" id="H9Y-0s-CSS"/>
47-
</constraints>
48-
<state key="normal" title="Button" image="image_small"/>
34+
<button opaque="NO" tag="2" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ybD-W4-tqi">
35+
<rect key="frame" x="20" y="249" width="105" height="78"/>
36+
<state key="normal" backgroundImage="2"/>
4937
<connections>
50-
<action selector="showViewer:" destination="BYZ-38-t0r" eventType="touchUpInside" id="eq1-9S-WCA"/>
38+
<action selector="showGalleryImageViewer:" destination="BYZ-38-t0r" eventType="touchUpInside" id="enQ-Ci-Y34"/>
39+
</connections>
40+
</button>
41+
<button opaque="NO" tag="4" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZtP-5M-x0L">
42+
<rect key="frame" x="20" y="335" width="163" height="108"/>
43+
<state key="normal" backgroundImage="4"/>
44+
<connections>
45+
<action selector="showGalleryImageViewer:" destination="BYZ-38-t0r" eventType="touchUpInside" id="a7r-FT-uUm"/>
46+
</connections>
47+
</button>
48+
<button opaque="NO" tag="5" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Fd6-Vz-POJ">
49+
<rect key="frame" x="56" y="447" width="201" height="83"/>
50+
<state key="normal" backgroundImage="5"/>
51+
<connections>
52+
<action selector="showGalleryImageViewer:" destination="BYZ-38-t0r" eventType="touchUpInside" id="1YS-ou-fMt"/>
53+
</connections>
54+
</button>
55+
<button opaque="NO" tag="6" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Bne-tn-gLP">
56+
<rect key="frame" x="189" y="393" width="68" height="50"/>
57+
<state key="normal" backgroundImage="6"/>
58+
<connections>
59+
<action selector="showGalleryImageViewer:" destination="BYZ-38-t0r" eventType="touchUpInside" id="GGP-zD-vjj"/>
60+
</connections>
61+
</button>
62+
<button opaque="NO" tag="7" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UDT-vb-Md5">
63+
<rect key="frame" x="139" y="160" width="118" height="167"/>
64+
<state key="normal" backgroundImage="7"/>
65+
<connections>
66+
<action selector="showGalleryImageViewer:" destination="BYZ-38-t0r" eventType="touchUpInside" id="7kw-yy-QHA"/>
67+
</connections>
68+
</button>
69+
<button opaque="NO" tag="3" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CJl-WL-vk9">
70+
<rect key="frame" x="189" y="356" width="47" height="29"/>
71+
<state key="normal" backgroundImage="3"/>
72+
<connections>
73+
<action selector="showGalleryImageViewer:" destination="BYZ-38-t0r" eventType="touchUpInside" id="ouv-ci-sRd"/>
74+
</connections>
75+
</button>
76+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Single Image" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7Pa-eG-yKR">
77+
<rect key="frame" x="20" y="20" width="99" height="21"/>
78+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
79+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
80+
<nil key="highlightedColor"/>
81+
</label>
82+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Gallery" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="e2Q-nC-lSR">
83+
<rect key="frame" x="20" y="112" width="54" height="21"/>
84+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
85+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
86+
<nil key="highlightedColor"/>
87+
</label>
88+
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WRv-58-cYl">
89+
<rect key="frame" x="20" y="51" width="86" height="48"/>
90+
<state key="normal" backgroundImage="image_small"/>
91+
<connections>
92+
<action selector="showSingleImageViewer:" destination="BYZ-38-t0r" eventType="touchUpInside" id="kdW-lW-YeZ"/>
5193
</connections>
5294
</button>
5395
</subviews>
5496
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
55-
<constraints>
56-
<constraint firstItem="Afc-5R-dCh" firstAttribute="leading" secondItem="Jdg-OI-jGr" secondAttribute="leading" id="1Ft-GS-hak"/>
57-
<constraint firstItem="Afc-5R-dCh" firstAttribute="top" secondItem="Jdg-OI-jGr" secondAttribute="bottom" constant="70" id="4UB-CL-3Kt"/>
58-
<constraint firstItem="msT-C2-wTG" firstAttribute="top" secondItem="Afc-5R-dCh" secondAttribute="bottom" constant="58" id="CFj-bn-ACe"/>
59-
<constraint firstItem="Afc-5R-dCh" firstAttribute="leading" secondItem="msT-C2-wTG" secondAttribute="leading" id="LPr-C7-fEO"/>
60-
<constraint firstItem="Jdg-OI-jGr" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" id="PRW-SS-Zb4"/>
61-
<constraint firstItem="Jdg-OI-jGr" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="pfC-SE-JZ7"/>
62-
</constraints>
6397
</view>
6498
</viewController>
6599
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
66100
</objects>
67-
<point key="canvasLocation" x="345" y="274"/>
101+
<point key="canvasLocation" x="-182" y="109"/>
68102
</scene>
69103
</scenes>
70104
<resources>
105+
<image name="0" width="1920" height="1200"/>
106+
<image name="1" width="1366" height="768"/>
107+
<image name="2" width="500" height="374"/>
108+
<image name="3" width="1680" height="1050"/>
109+
<image name="4" width="1024" height="681"/>
110+
<image name="5" width="618" height="257"/>
111+
<image name="6" width="600" height="437"/>
112+
<image name="7" width="1024" height="1448"/>
71113
<image name="image_small" width="256" height="144"/>
72114
</resources>
73115
</document>

0 commit comments

Comments
 (0)