-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from nakajijapan/add-push-animation
Add the animation for Page Transition
- Loading branch information
Showing
9 changed files
with
181 additions
and
34 deletions.
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,46 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="qId-Qb-ucm"> | ||
<device id="retina4_7" orientation="portrait"> | ||
<adaptation id="fullscreen"/> | ||
</device> | ||
<dependencies> | ||
<deployment identifier="iOS"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/> | ||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<scenes> | ||
<!--Next View Controller--> | ||
<scene sceneID="hjk-CO-qJn"> | ||
<objects> | ||
<viewController id="qId-Qb-ucm" customClass="NextViewController" customModule="Shari_Demo" customModuleProvider="target" sceneMemberID="viewController"> | ||
<layoutGuides> | ||
<viewControllerLayoutGuide type="top" id="r2d-Rm-CcY"/> | ||
<viewControllerLayoutGuide type="bottom" id="55j-SC-nOR"/> | ||
</layoutGuides> | ||
<view key="view" contentMode="scaleToFill" id="bnV-YY-ftr"> | ||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<subviews> | ||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Next" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8sf-Og-Czn"> | ||
<rect key="frame" x="323" y="80" width="36" height="21"/> | ||
<fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
<nil key="textColor"/> | ||
<nil key="highlightedColor"/> | ||
</label> | ||
</subviews> | ||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
<constraints> | ||
<constraint firstItem="8sf-Og-Czn" firstAttribute="top" secondItem="r2d-Rm-CcY" secondAttribute="bottom" constant="16" id="Sb2-gc-Fdl"/> | ||
<constraint firstAttribute="trailing" secondItem="8sf-Og-Czn" secondAttribute="trailing" constant="16" id="Xm9-0V-fTf"/> | ||
</constraints> | ||
<viewLayoutGuide key="safeArea" id="NsB-KZ-lC1"/> | ||
</view> | ||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/> | ||
</viewController> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="5fp-mw-V0p" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="2068" y="1210"/> | ||
</scene> | ||
</scenes> | ||
</document> |
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,30 @@ | ||
// | ||
// NextViewController.swift | ||
// Shari-Demo | ||
// | ||
// Created by Daichi Nakajima on 2019/02/15. | ||
// Copyright © 2019 nakajijapan. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
import Shari | ||
|
||
class NextViewController: UIViewController { | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
} | ||
|
||
override func viewWillAppear(_ animated: Bool) { | ||
super.viewWillAppear(animated) | ||
|
||
guard let currentController = navigationController as? ShariNavigationController else { | ||
fatalError("Need the ShariNavigationController") | ||
} | ||
|
||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) { | ||
currentController.transition(height: 250) | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.