Created
February 8, 2016 20:19
-
-
Save abbeyjackson/4d6caf44ccf7a01a66eb to your computer and use it in GitHub Desktop.
This is the source code for a centered scroll view xib file.
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES"> | |
<dependencies> | |
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/> | |
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/> | |
</dependencies> | |
<objects> | |
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="tempViewController" customModule="Takl" customModuleProvider="target"/> | |
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> | |
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="Lgh-E8-3oL"> | |
<rect key="frame" x="0.0" y="0.0" width="600" height="1188"/> | |
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | |
<subviews> | |
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7sF-wO-xuD"> | |
<rect key="frame" x="0.0" y="0.0" width="600" height="1188"/> | |
<subviews> | |
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="d0h-oA-xwf" userLabel="Content View"> | |
<rect key="frame" x="0.0" y="0.0" width="600" height="865"/> | |
<subviews> | |
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YD3-pu-ccG" userLabel="Centered Content View"> | |
<rect key="frame" x="20" y="0.0" width="560" height="865"/> | |
<subviews> | |
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eFz-Ty-7Lu"> | |
<rect key="frame" x="0.0" y="0.0" width="560" height="150"/> | |
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
<constraints> | |
<constraint firstAttribute="height" constant="150" id="vD8-IZ-gpO"/> | |
</constraints> | |
</view> | |
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" indicatorStyle="white" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="Gyr-bm-fRa"> | |
<rect key="frame" x="0.0" y="190" width="560" height="560"/> | |
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
<constraints> | |
<constraint firstAttribute="width" secondItem="Gyr-bm-fRa" secondAttribute="height" multiplier="1:1" id="wqD-ui-zye"/> | |
</constraints> | |
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="20" minimumInteritemSpacing="20" id="ViU-PE-H4T"> | |
<size key="itemSize" width="50" height="50"/> | |
<size key="headerReferenceSize" width="0.0" height="0.0"/> | |
<size key="footerReferenceSize" width="0.0" height="0.0"/> | |
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/> | |
</collectionViewFlowLayout> | |
</collectionView> | |
<button opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="1000" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="INN-wC-zco"> | |
<rect key="frame" x="0.0" y="790" width="560" height="75"/> | |
<color key="backgroundColor" red="0.19215686269999999" green="0.7843137255" blue="0.75294117650000003" alpha="1" colorSpace="calibratedRGB"/> | |
<constraints> | |
<constraint firstAttribute="height" constant="75" id="Jnw-iY-QmE"/> | |
</constraints> | |
<fontDescription key="fontDescription" name="Avenir-Light" family="Avenir" pointSize="34"/> | |
<state key="normal" title="Next"> | |
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
</state> | |
</button> | |
</subviews> | |
<color key="backgroundColor" red="0.1176470588" green="0.70196078429999997" blue="0.50980392159999999" alpha="1" colorSpace="calibratedRGB"/> | |
<constraints> | |
<constraint firstAttribute="width" relation="lessThanOrEqual" constant="640" id="2dS-pI-gLy"/> | |
<constraint firstAttribute="bottom" secondItem="INN-wC-zco" secondAttribute="bottom" id="2ma-3b-pga"/> | |
<constraint firstItem="Gyr-bm-fRa" firstAttribute="leading" secondItem="YD3-pu-ccG" secondAttribute="leading" id="57q-4w-uQ4"/> | |
<constraint firstAttribute="trailing" secondItem="INN-wC-zco" secondAttribute="trailing" id="GpS-e5-4h4"/> | |
<constraint firstItem="Gyr-bm-fRa" firstAttribute="top" secondItem="eFz-Ty-7Lu" secondAttribute="bottom" constant="40" id="PuV-Xi-w3Z"/> | |
<constraint firstItem="INN-wC-zco" firstAttribute="top" secondItem="Gyr-bm-fRa" secondAttribute="bottom" constant="40" id="URd-Ws-gIF"/> | |
<constraint firstItem="eFz-Ty-7Lu" firstAttribute="top" secondItem="YD3-pu-ccG" secondAttribute="top" id="hV8-xl-jpR"/> | |
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="320" id="jfp-VL-JV8"/> | |
<constraint firstAttribute="trailing" secondItem="Gyr-bm-fRa" secondAttribute="trailing" id="jiR-DZ-cQd"/> | |
<constraint firstAttribute="trailing" secondItem="eFz-Ty-7Lu" secondAttribute="trailing" id="muK-QT-zgF"/> | |
<constraint firstItem="INN-wC-zco" firstAttribute="leading" secondItem="YD3-pu-ccG" secondAttribute="leading" id="uqN-Vf-iup"/> | |
<constraint firstItem="eFz-Ty-7Lu" firstAttribute="leading" secondItem="YD3-pu-ccG" secondAttribute="leading" id="wcY-16-FQH"/> | |
</constraints> | |
</view> | |
</subviews> | |
<color key="backgroundColor" red="1" green="0.0" blue="0.50196081400000003" alpha="1" colorSpace="calibratedRGB"/> | |
<constraints> | |
<constraint firstItem="YD3-pu-ccG" firstAttribute="top" secondItem="d0h-oA-xwf" secondAttribute="top" priority="999" id="2Qe-Qj-1Du"/> | |
<constraint firstItem="YD3-pu-ccG" firstAttribute="leading" secondItem="d0h-oA-xwf" secondAttribute="leading" priority="999" constant="20" id="Ayr-o2-Lke"/> | |
<constraint firstItem="YD3-pu-ccG" firstAttribute="centerX" secondItem="d0h-oA-xwf" secondAttribute="centerX" id="Dfg-3d-fHo"/> | |
<constraint firstAttribute="trailing" secondItem="YD3-pu-ccG" secondAttribute="trailing" priority="999" constant="20" id="MHo-Nq-j5g"/> | |
<constraint firstAttribute="bottom" secondItem="YD3-pu-ccG" secondAttribute="bottom" priority="999" id="VuI-sF-E4n"/> | |
<constraint firstItem="YD3-pu-ccG" firstAttribute="centerY" secondItem="d0h-oA-xwf" secondAttribute="centerY" id="ntg-H3-8dK"/> | |
</constraints> | |
</view> | |
</subviews> | |
<constraints> | |
<constraint firstItem="d0h-oA-xwf" firstAttribute="leading" secondItem="7sF-wO-xuD" secondAttribute="leading" id="5tx-Fq-1MN"/> | |
<constraint firstAttribute="trailing" secondItem="d0h-oA-xwf" secondAttribute="trailing" id="SEk-C6-NC5"/> | |
<constraint firstItem="d0h-oA-xwf" firstAttribute="top" secondItem="7sF-wO-xuD" secondAttribute="top" id="Ur6-Gp-o3Q"/> | |
<constraint firstAttribute="bottom" secondItem="d0h-oA-xwf" secondAttribute="bottom" id="rxm-i4-6Lq"/> | |
</constraints> | |
</scrollView> | |
</subviews> | |
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
<constraints> | |
<constraint firstItem="7sF-wO-xuD" firstAttribute="top" secondItem="Lgh-E8-3oL" secondAttribute="top" id="ESh-k9-P2l"/> | |
<constraint firstItem="d0h-oA-xwf" firstAttribute="width" secondItem="Lgh-E8-3oL" secondAttribute="width" id="G5F-X3-Vs5"/> | |
<constraint firstAttribute="bottom" secondItem="7sF-wO-xuD" secondAttribute="bottom" id="HEe-mA-iG2"/> | |
<constraint firstAttribute="trailing" secondItem="7sF-wO-xuD" secondAttribute="trailing" id="J97-YQ-mdb"/> | |
<constraint firstItem="7sF-wO-xuD" firstAttribute="leading" secondItem="Lgh-E8-3oL" secondAttribute="leading" id="PpN-bI-sjN"/> | |
</constraints> | |
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> | |
<point key="canvasLocation" x="234" y="557"/> | |
</view> | |
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="TIk-hQ-DDW"> | |
<rect key="frame" x="0.0" y="0.0" width="600" height="984"/> | |
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | |
<subviews> | |
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VQj-eX-cLF"> | |
<rect key="frame" x="0.0" y="0.0" width="600" height="984"/> | |
<subviews> | |
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Edx-T8-KcS" userLabel="Content View"> | |
<rect key="frame" x="0.0" y="0.0" width="600" height="1410"/> | |
<subviews> | |
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wTN-aK-tnj"> | |
<rect key="frame" x="20" y="0.0" width="560" height="1410"/> | |
<subviews> | |
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="csh-Lf-BLI"> | |
<rect key="frame" x="0.0" y="50" width="560" height="200"/> | |
<color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/> | |
<constraints> | |
<constraint firstAttribute="height" constant="200" id="9en-mL-i7O"/> | |
</constraints> | |
</view> | |
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4tz-ir-ePA"> | |
<rect key="frame" x="0.0" y="550" width="560" height="560"/> | |
<color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/> | |
<constraints> | |
<constraint firstAttribute="width" secondItem="4tz-ir-ePA" secondAttribute="height" id="cvj-Es-lGp"/> | |
</constraints> | |
</view> | |
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hBA-dg-6J5"> | |
<rect key="frame" x="0.0" y="1160" width="560" height="200"/> | |
<color key="backgroundColor" red="0.83224826389999995" green="0.0" blue="0.0083653599910000001" alpha="1" colorSpace="calibratedRGB"/> | |
<constraints> | |
<constraint firstAttribute="height" constant="200" id="Ne7-JQ-HLp"/> | |
</constraints> | |
</view> | |
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yO4-BV-INn"> | |
<rect key="frame" x="0.0" y="300" width="560" height="200"/> | |
<color key="backgroundColor" red="0.83224826389999995" green="0.0" blue="0.0083653599910000001" alpha="1" colorSpace="calibratedRGB"/> | |
<constraints> | |
<constraint firstAttribute="height" constant="200" id="ACm-vD-4xL"/> | |
</constraints> | |
</view> | |
</subviews> | |
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
<constraints> | |
<constraint firstAttribute="trailing" secondItem="yO4-BV-INn" secondAttribute="trailing" id="8Dh-O2-8bb"/> | |
<constraint firstItem="yO4-BV-INn" firstAttribute="leading" secondItem="wTN-aK-tnj" secondAttribute="leading" id="DKc-2l-Bpc"/> | |
<constraint firstItem="hBA-dg-6J5" firstAttribute="top" secondItem="4tz-ir-ePA" secondAttribute="bottom" constant="50" id="DXC-J9-OFy"/> | |
<constraint firstAttribute="bottom" secondItem="hBA-dg-6J5" secondAttribute="bottom" constant="50" id="Drg-jo-fxS"/> | |
<constraint firstItem="csh-Lf-BLI" firstAttribute="leading" secondItem="wTN-aK-tnj" secondAttribute="leading" id="Egk-qW-aCg"/> | |
<constraint firstAttribute="trailing" secondItem="csh-Lf-BLI" secondAttribute="trailing" id="HRE-Hs-cO1"/> | |
<constraint firstAttribute="trailing" secondItem="4tz-ir-ePA" secondAttribute="trailing" id="NMw-x6-OUq"/> | |
<constraint firstItem="4tz-ir-ePA" firstAttribute="top" secondItem="yO4-BV-INn" secondAttribute="bottom" constant="50" id="Q81-29-Uqp"/> | |
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="240" id="ZjF-Tc-4q9"/> | |
<constraint firstItem="csh-Lf-BLI" firstAttribute="top" secondItem="wTN-aK-tnj" secondAttribute="top" constant="50" id="ae6-1y-AU8"/> | |
<constraint firstItem="4tz-ir-ePA" firstAttribute="leading" secondItem="wTN-aK-tnj" secondAttribute="leading" id="ixS-pH-hLq"/> | |
<constraint firstItem="hBA-dg-6J5" firstAttribute="leading" secondItem="wTN-aK-tnj" secondAttribute="leading" id="kLy-Wh-U33"/> | |
<constraint firstAttribute="width" relation="lessThanOrEqual" constant="720" id="oBK-Ar-qdi"/> | |
<constraint firstAttribute="trailing" secondItem="hBA-dg-6J5" secondAttribute="trailing" id="oLC-Rd-tHG"/> | |
<constraint firstItem="yO4-BV-INn" firstAttribute="top" secondItem="csh-Lf-BLI" secondAttribute="bottom" constant="50" id="rx8-kL-5Xi"/> | |
</constraints> | |
</view> | |
</subviews> | |
<color key="backgroundColor" red="1" green="0.0" blue="0.50196081400000003" alpha="1" colorSpace="calibratedRGB"/> | |
<constraints> | |
<constraint firstItem="wTN-aK-tnj" firstAttribute="leading" secondItem="Edx-T8-KcS" secondAttribute="leading" priority="999" constant="20" id="0vE-C4-hYz"/> | |
<constraint firstItem="wTN-aK-tnj" firstAttribute="top" secondItem="Edx-T8-KcS" secondAttribute="top" priority="999" id="19u-hd-rep"/> | |
<constraint firstAttribute="trailing" secondItem="wTN-aK-tnj" secondAttribute="trailing" priority="999" constant="20" id="ES7-Dv-23k"/> | |
<constraint firstItem="wTN-aK-tnj" firstAttribute="centerX" secondItem="Edx-T8-KcS" secondAttribute="centerX" id="WP1-jQ-l7C"/> | |
<constraint firstAttribute="bottom" secondItem="wTN-aK-tnj" secondAttribute="bottom" priority="999" id="vaF-KM-11f"/> | |
<constraint firstItem="wTN-aK-tnj" firstAttribute="centerY" secondItem="Edx-T8-KcS" secondAttribute="centerY" id="z8g-Zh-W28"/> | |
</constraints> | |
</view> | |
</subviews> | |
<color key="backgroundColor" red="0.221656297" green="1" blue="0.1720716343" alpha="1" colorSpace="calibratedRGB"/> | |
<constraints> | |
<constraint firstAttribute="bottom" secondItem="Edx-T8-KcS" secondAttribute="bottom" id="CqH-Ty-GSs"/> | |
<constraint firstItem="Edx-T8-KcS" firstAttribute="leading" secondItem="VQj-eX-cLF" secondAttribute="leading" id="REG-UR-BQc"/> | |
<constraint firstAttribute="trailing" secondItem="Edx-T8-KcS" secondAttribute="trailing" id="Vqe-Du-f7X"/> | |
<constraint firstItem="Edx-T8-KcS" firstAttribute="top" secondItem="VQj-eX-cLF" secondAttribute="top" id="qRM-Hq-Ero"/> | |
</constraints> | |
</scrollView> | |
</subviews> | |
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
<constraints> | |
<constraint firstAttribute="trailing" secondItem="VQj-eX-cLF" secondAttribute="trailing" id="Hxo-Kx-Vrd"/> | |
<constraint firstAttribute="bottom" secondItem="VQj-eX-cLF" secondAttribute="bottom" id="QsX-dj-4vX"/> | |
<constraint firstItem="VQj-eX-cLF" firstAttribute="top" secondItem="TIk-hQ-DDW" secondAttribute="top" id="TjO-oU-hdq"/> | |
<constraint firstItem="VQj-eX-cLF" firstAttribute="leading" secondItem="TIk-hQ-DDW" secondAttribute="leading" id="agT-Z1-2wa"/> | |
<constraint firstItem="Edx-T8-KcS" firstAttribute="width" secondItem="TIk-hQ-DDW" secondAttribute="width" id="ceW-cW-I4w"/> | |
</constraints> | |
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> | |
<point key="canvasLocation" x="261" y="321"/> | |
</view> | |
</objects> | |
</document> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment