Skip to content

Commit

Permalink
Merge branch 'subviews'
Browse files Browse the repository at this point in the history
# Conflicts:
#	PullToRefreshDemo/Base.lproj/Main.storyboard
#	PullToRefreshDemo/BeatAnimator.swift
#	PullToRefreshDemo/PacmanAnimator.swift
#	PullToRefreshDemo/PullToRefreshViewController.swift
#	Refresher/Animator.swift
#	Refresher/PullToRefreshView.swift
  • Loading branch information
jcavar committed Aug 2, 2015
2 parents 8359636 + 687f3d4 commit 2d88caf
Show file tree
Hide file tree
Showing 11 changed files with 498 additions and 226 deletions.
38 changes: 33 additions & 5 deletions PullToRefresh.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
C7AC6CFC19A894DF007107DF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7AC6CF619A894DF007107DF /* AppDelegate.swift */; };
C7AC6CFD19A894DF007107DF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C7AC6CF719A894DF007107DF /* Main.storyboard */; };
C7AC6CFE19A894DF007107DF /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C7AC6CF919A894DF007107DF /* Images.xcassets */; };
C7AC6D0019A894DF007107DF /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7AC6CFB19A894DF007107DF /* ViewController.swift */; };
C7AC6D0019A894DF007107DF /* PullToRefreshViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7AC6CFB19A894DF007107DF /* PullToRefreshViewController.swift */; };
C7AEDC171B6D53D100E09098 /* ChooseModeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7AEDC161B6D53D100E09098 /* ChooseModeViewController.swift */; };
C7B53A431AC996B80021914B /* CustomSubview.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7B53A421AC996B80021914B /* CustomSubview.swift */; };
C7B53A451AC9971C0021914B /* CustomSubview.xib in Resources */ = {isa = PBXBuildFile; fileRef = C7B53A441AC9971C0021914B /* CustomSubview.xib */; };
C7DA91CD19B31B7C00C4012B /* Animator.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7DA91CC19B31B7C00C4012B /* Animator.swift */; };
C7DA91CE19B348EA00C4012B /* Animator.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7DA91CC19B31B7C00C4012B /* Animator.swift */; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -82,7 +85,10 @@
C7AC6CF819A894DF007107DF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
C7AC6CF919A894DF007107DF /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
C7AC6CFA19A894DF007107DF /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
C7AC6CFB19A894DF007107DF /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
C7AC6CFB19A894DF007107DF /* PullToRefreshViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PullToRefreshViewController.swift; sourceTree = "<group>"; };
C7AEDC161B6D53D100E09098 /* ChooseModeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChooseModeViewController.swift; sourceTree = "<group>"; };
C7B53A421AC996B80021914B /* CustomSubview.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomSubview.swift; sourceTree = "<group>"; };
C7B53A441AC9971C0021914B /* CustomSubview.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CustomSubview.xib; sourceTree = "<group>"; };
C7D1CF8F199BB3C8009FD485 /* PullToRefreshDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PullToRefreshDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
C7DA91CC19B31B7C00C4012B /* Animator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Animator.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -164,14 +170,33 @@
isa = PBXGroup;
children = (
C7AC6CF619A894DF007107DF /* AppDelegate.swift */,
C7AC6CFB19A894DF007107DF /* ViewController.swift */,
C7AEDC181B6D53DA00E09098 /* ViewController */,
C7AC6CF719A894DF007107DF /* Main.storyboard */,
C7AC6CF919A894DF007107DF /* Images.xcassets */,
C7956A3D19A8966400CF6484 /* Supporting Files */,
C7AEDC191B6D53E000E09098 /* Animator */,
);
path = PullToRefreshDemo;
sourceTree = "<group>";
};
C7AEDC181B6D53DA00E09098 /* ViewController */ = {
isa = PBXGroup;
children = (
C7AC6CFB19A894DF007107DF /* PullToRefreshViewController.swift */,
C7AEDC161B6D53D100E09098 /* ChooseModeViewController.swift */,
);
name = ViewController;
sourceTree = "<group>";
};
C7AEDC191B6D53E000E09098 /* Animator */ = {
isa = PBXGroup;
children = (
C7A355A119B612D5000DDC72 /* BeatAnimator.swift */,
C7A355D019B62125000DDC72 /* PacmanAnimator.swift */,
C7B53A421AC996B80021914B /* CustomSubview.swift */,
C7B53A441AC9971C0021914B /* CustomSubview.xib */,
);
path = PullToRefreshDemo;
name = Animator;
sourceTree = "<group>";
};
C7D1CF86199BB3C8009FD485 = {
Expand Down Expand Up @@ -326,6 +351,7 @@
files = (
C7AC6CFD19A894DF007107DF /* Main.storyboard in Resources */,
C7AC6CFE19A894DF007107DF /* Images.xcassets in Resources */,
C7B53A451AC9971C0021914B /* CustomSubview.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -360,8 +386,10 @@
buildActionMask = 2147483647;
files = (
C7A355D119B62125000DDC72 /* PacmanAnimator.swift in Sources */,
C7AC6D0019A894DF007107DF /* ViewController.swift in Sources */,
C7B53A431AC996B80021914B /* CustomSubview.swift in Sources */,
C7AC6D0019A894DF007107DF /* PullToRefreshViewController.swift in Sources */,
C7AC6CFC19A894DF007107DF /* AppDelegate.swift in Sources */,
C7AEDC171B6D53D100E09098 /* ChooseModeViewController.swift in Sources */,
C7A355A219B612D5000DDC72 /* BeatAnimator.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
83 changes: 75 additions & 8 deletions PullToRefreshDemo/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,30 +1,97 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7702" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="RWb-co-Zty">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="RWb-co-Zty">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<scenes>
<!--Navigation Controller-->
<scene sceneID="Rsh-zy-279">
<objects>
<navigationController id="RWb-co-Zty" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="UI3-5k-GHX">
<navigationBar key="navigationBar" contentMode="scaleToFill" translucent="NO" id="UI3-5k-GHX">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<color key="barTintColor" red="0.96862751245498657" green="0.96862751245498657" blue="0.96862751245498657" alpha="1" colorSpace="deviceRGB"/>
</navigationBar>
<connections>
<segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="UhW-aa-ZwF"/>
<segue destination="RFH-zq-9gR" kind="relationship" relationship="rootViewController" id="WGV-CK-QNn"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Vwd-RL-BVZ" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-655" y="59"/>
</scene>
<!--Choose Mode View Controller-->
<scene sceneID="oAy-Hl-ycD">
<objects>
<viewController id="RFH-zq-9gR" customClass="ChooseModeViewController" customModule="PullToRefreshDemo" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Jwa-dH-WnZ"/>
<viewControllerLayoutGuide type="bottom" id="WkW-1z-Uxh"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="SeT-4b-Nhw">
<rect key="frame" x="0.0" y="0.0" width="320" height="504"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8ef-eQ-bwJ">
<rect key="frame" x="144" y="96" width="32" height="30"/>
<state key="normal" title="Beat">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="beatAction:" destination="RFH-zq-9gR" eventType="touchUpInside" id="j1e-Ug-Hw7"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Phb-fN-T5w">
<rect key="frame" x="132" y="134" width="56" height="30"/>
<state key="normal" title="Pacman">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="pacmanAction:" destination="RFH-zq-9gR" eventType="touchUpInside" id="aK3-Na-Pco"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Bnx-XC-RaR">
<rect key="frame" x="133" y="172" width="54" height="30"/>
<state key="normal" title="Custom">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="customAction:" destination="RFH-zq-9gR" eventType="touchUpInside" id="LfN-aH-EiW"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="h5G-X9-Qyf">
<rect key="frame" x="136" y="58" width="49" height="30"/>
<state key="normal" title="Default">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="defaultAction:" destination="RFH-zq-9gR" eventType="touchUpInside" id="vuF-tC-pFA"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="centerX" secondItem="Phb-fN-T5w" secondAttribute="centerX" id="PCV-Gn-Hr1"/>
<constraint firstAttribute="centerX" secondItem="8ef-eQ-bwJ" secondAttribute="centerX" id="age-3w-nqf"/>
<constraint firstAttribute="centerX" secondItem="Bnx-XC-RaR" secondAttribute="centerX" id="b7p-mx-ov2"/>
<constraint firstItem="8ef-eQ-bwJ" firstAttribute="top" secondItem="h5G-X9-Qyf" secondAttribute="bottom" constant="8" id="d05-jf-IhB"/>
<constraint firstItem="h5G-X9-Qyf" firstAttribute="top" secondItem="Jwa-dH-WnZ" secondAttribute="bottom" constant="58" id="eMs-2s-g1f"/>
<constraint firstItem="Bnx-XC-RaR" firstAttribute="top" secondItem="Phb-fN-T5w" secondAttribute="bottom" constant="8" id="mTB-9E-ci7"/>
<constraint firstItem="Phb-fN-T5w" firstAttribute="top" secondItem="8ef-eQ-bwJ" secondAttribute="bottom" constant="8" id="u0s-Uu-qxY"/>
<constraint firstAttribute="centerX" secondItem="h5G-X9-Qyf" secondAttribute="centerX" id="wpB-gj-h9z"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="o92-TZ-fbq"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="V7h-TM-QaQ" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-243" y="59"/>
</scene>
<!--Pull to refresh example-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="PullToRefreshDemo" customModuleProvider="target" sceneMemberID="viewController">
<viewController storyboardIdentifier="PullToRefreshViewController" id="BYZ-38-t0r" customClass="PullToRefreshViewController" customModule="PullToRefreshDemo" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Da1-dG-drI"/>
<viewControllerLayoutGuide type="bottom" id="Uca-LH-LIW"/>
Expand All @@ -34,7 +101,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="60" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="h8l-ma-AYT">
<rect key="frame" x="0.0" y="64" width="320" height="504"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<sections/>
<connections>
Expand All @@ -44,9 +111,9 @@
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="h8l-ma-AYT" firstAttribute="top" secondItem="Da1-dG-drI" secondAttribute="bottom" id="38z-sU-HmL"/>
<constraint firstItem="Uca-LH-LIW" firstAttribute="top" secondItem="h8l-ma-AYT" secondAttribute="bottom" id="D8K-CE-Vq7"/>
<constraint firstAttribute="trailing" secondItem="h8l-ma-AYT" secondAttribute="trailing" id="Er9-4b-QHO"/>
<constraint firstItem="h8l-ma-AYT" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" id="Nkq-8N-Au9"/>
<constraint firstItem="h8l-ma-AYT" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="Z3q-lz-tWx"/>
</constraints>
</view>
Expand All @@ -57,7 +124,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-231" y="59"/>
<point key="canvasLocation" x="124" y="59"/>
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
Expand Down
Loading

0 comments on commit 2d88caf

Please sign in to comment.