Skip to content

Commit

Permalink
add sample project
Browse files Browse the repository at this point in the history
  • Loading branch information
Kazuhiro Hayashi committed Jul 3, 2017
1 parent 9619dd2 commit 38ae5a8
Show file tree
Hide file tree
Showing 19 changed files with 1,242 additions and 0 deletions.
Binary file not shown.
10 changes: 10 additions & 0 deletions PagingKit.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "0"
version = "2.0">
</Bucket>
567 changes: 567 additions & 0 deletions iOS Sample/iOS Sample.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions iOS Sample/iOS Sample/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
//
// AppDelegate.swift
// iOS Sample
//
// Created by Kazuhiro Hayashi on 7/3/17.
// Copyright © 2017 Kazuhiro Hayashi. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}

func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}

func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}

func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}


}

Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
27 changes: 27 additions & 0 deletions iOS Sample/iOS Sample/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
130 changes: 130 additions & 0 deletions iOS Sample/iOS Sample/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="iOS_Sample" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<containerView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sd7-sa-ZYE">
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="qw3-oa-0sm"/>
</constraints>
<connections>
<segue destination="VVt-ht-N0L" kind="embed" id="pRH-N5-adc"/>
</connections>
</containerView>
<containerView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1U5-cO-qes">
<rect key="frame" x="0.0" y="64" width="375" height="603"/>
<connections>
<segue destination="qGV-r2-Oby" kind="embed" id="ny9-Ig-sj6"/>
</connections>
</containerView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="1U5-cO-qes" firstAttribute="top" secondItem="sd7-sa-ZYE" secondAttribute="bottom" id="0x9-wV-HP8"/>
<constraint firstAttribute="trailing" secondItem="1U5-cO-qes" secondAttribute="trailing" id="7Rq-pd-FU8"/>
<constraint firstItem="sd7-sa-ZYE" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" id="9Gz-8w-PBV"/>
<constraint firstAttribute="trailing" secondItem="sd7-sa-ZYE" secondAttribute="trailing" id="X50-2Z-EXQ"/>
<constraint firstItem="sd7-sa-ZYE" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="bRt-ZF-u7A"/>
<constraint firstItem="1U5-cO-qes" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="hwh-7X-cTI"/>
<constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="1U5-cO-qes" secondAttribute="bottom" id="qxs-ck-6Xo"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="32.799999999999997" y="37.331334332833585"/>
</scene>
<!--Content View Controller-->
<scene sceneID="hg3-5E-45p">
<objects>
<viewController storyboardIdentifier="ContentViewController" id="L3a-cd-ggL" customClass="ContentViewController" customModule="iOS_Sample" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="9j1-Qw-BCS"/>
<viewControllerLayoutGuide type="bottom" id="Saf-QR-Ao7"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="koT-y0-fa3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Amt-Sq-SXw">
<rect key="frame" x="16" y="16" width="343" height="635"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cT5-ir-MLI">
<rect key="frame" x="137.5" y="301" width="66.5" height="33.5"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle1"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="cT5-ir-MLI" firstAttribute="centerX" secondItem="Amt-Sq-SXw" secondAttribute="centerX" id="6Da-qF-0l4"/>
<constraint firstItem="cT5-ir-MLI" firstAttribute="centerY" secondItem="Amt-Sq-SXw" secondAttribute="centerY" id="l2G-0L-a1h"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="Amt-Sq-SXw" secondAttribute="trailing" constant="16" id="CSo-mH-q1G"/>
<constraint firstItem="Amt-Sq-SXw" firstAttribute="top" secondItem="koT-y0-fa3" secondAttribute="top" constant="16" id="H6T-tN-E1h"/>
<constraint firstAttribute="bottom" secondItem="Amt-Sq-SXw" secondAttribute="bottom" constant="16" id="z41-bE-Uf2"/>
<constraint firstItem="Amt-Sq-SXw" firstAttribute="leading" secondItem="koT-y0-fa3" secondAttribute="leading" constant="16" id="z7Y-V9-hL2"/>
</constraints>
</view>
<connections>
<outlet property="numberLabel" destination="cT5-ir-MLI" id="Aeb-gQ-0KG"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="IZ0-r7-U6t" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="33" y="776"/>
</scene>
<!--Paging Menu View Controller-->
<scene sceneID="8Ou-uv-ZeZ">
<objects>
<viewController id="VVt-ht-N0L" customClass="PagingMenuViewController" customModule="PagingKit" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="ta9-yS-jNS">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="LYV-HS-S6G" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="886" y="37"/>
</scene>
<!--Paging Content View Controller-->
<scene sceneID="uIF-yT-maz">
<objects>
<viewController id="qGV-r2-Oby" customClass="PagingContentViewController" customModule="PagingKit" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="1n4-Yt-37G">
<rect key="frame" x="0.0" y="0.0" width="375" height="603"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="EoS-tx-ycv" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="886" y="406"/>
</scene>
</scenes>
</document>
39 changes: 39 additions & 0 deletions iOS Sample/iOS Sample/ContentViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//
// ContentViewController.swift
// iOS Sample
//
// Created by Kazuhiro Hayashi on 7/4/17.
// Copyright © 2017 Kazuhiro Hayashi. All rights reserved.
//

import UIKit

class ContentViewController: UIViewController {

var number: String?

@IBOutlet weak var numberLabel: UILabel!
override func viewDidLoad() {
super.viewDidLoad()

numberLabel.text = number
// Do any additional setup after loading the view.
}

override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}


/*
// MARK: - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/

}
34 changes: 34 additions & 0 deletions iOS Sample/iOS Sample/FocusView.xib
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12121"/>
<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"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="PagingMenuFocusView" customModule="PagingKit">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Toa-Nf-xaC">
<rect key="frame" x="0.0" y="663" width="375" height="4"/>
<color key="backgroundColor" red="0.91372549020000005" green="0.34901960780000002" blue="0.31372549020000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="4" id="FTd-UT-9jD"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="Toa-Nf-xaC" secondAttribute="trailing" id="bQL-Mc-2NS"/>
<constraint firstItem="Toa-Nf-xaC" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="kJg-UB-pgZ"/>
<constraint firstAttribute="bottom" secondItem="Toa-Nf-xaC" secondAttribute="bottom" id="sEJ-nm-TqT"/>
</constraints>
</view>
</objects>
</document>
Loading

0 comments on commit 38ae5a8

Please sign in to comment.