Skip to content

Commit

Permalink
Add demo
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhengYidong committed Jan 13, 2017
1 parent 00d8b1b commit e5f2c21
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 3 deletions.
Binary file added Demo/mbmotion_actionsheet_origin.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Demo/mbmotion_hamburgbutton.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions Example/MBMotion.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
8572E7171E27B00A00D15244 /* MBMotionEyeLoadingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8572E7161E27B00A00D15244 /* MBMotionEyeLoadingViewController.swift */; };
8572E7191E288B9800D15244 /* MBMotionTableViewCellContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8572E7181E288B9800D15244 /* MBMotionTableViewCellContentView.swift */; };
8572E71B1E288BA600D15244 /* MBMotionTableViewCellContentView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8572E71A1E288BA600D15244 /* MBMotionTableViewCellContentView.xib */; };
8572E71D1E289EDC00D15244 /* MBMotionHamburgButtonViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8572E71C1E289EDC00D15244 /* MBMotionHamburgButtonViewController.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -62,6 +63,7 @@
8572E7161E27B00A00D15244 /* MBMotionEyeLoadingViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MBMotionEyeLoadingViewController.swift; sourceTree = "<group>"; };
8572E7181E288B9800D15244 /* MBMotionTableViewCellContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MBMotionTableViewCellContentView.swift; sourceTree = "<group>"; };
8572E71A1E288BA600D15244 /* MBMotionTableViewCellContentView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MBMotionTableViewCellContentView.xib; sourceTree = "<group>"; };
8572E71C1E289EDC00D15244 /* MBMotionHamburgButtonViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MBMotionHamburgButtonViewController.swift; sourceTree = "<group>"; };
A1872507DF01BAF24FADBDD7 /* MBMotion.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = MBMotion.podspec; path = ../MBMotion.podspec; sourceTree = "<group>"; };
A764F58A1B580A1E6E75E835 /* Pods-MBMotion_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MBMotion_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-MBMotion_Tests/Pods-MBMotion_Tests.release.xcconfig"; sourceTree = "<group>"; };
AECD8178E4C148064898A82F /* Pods-MBMotion_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MBMotion_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-MBMotion_Tests/Pods-MBMotion_Tests.debug.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -181,6 +183,7 @@
8572E7091E279B4A00D15244 /* MBMotionWebViewController.swift */,
8572E70D1E279B7000D15244 /* ViewController.swift */,
8572E7161E27B00A00D15244 /* MBMotionEyeLoadingViewController.swift */,
8572E71C1E289EDC00D15244 /* MBMotionHamburgButtonViewController.swift */,
);
name = Controllers;
sourceTree = "<group>";
Expand Down Expand Up @@ -430,6 +433,7 @@
8572E7061E279B3D00D15244 /* MBTableHeaderView.swift in Sources */,
8572E70C1E279B5800D15244 /* MBMotionActionSheetDemoViewController.swift in Sources */,
8572E70E1E279B7000D15244 /* ViewController.swift in Sources */,
8572E71D1E289EDC00D15244 /* MBMotionHamburgButtonViewController.swift in Sources */,
607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
35 changes: 35 additions & 0 deletions Example/MBMotion/MBMotionHamburgButtonViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//
// MBMotionHamburgButtonViewController.swift
// MBMotion
//
// Created by ZhengYidong on 13/01/2017.
// Copyright © 2017 CocoaPods. All rights reserved.
//

import UIKit

class MBMotionHamburgButtonViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()

// 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.
}
*/

}
38 changes: 36 additions & 2 deletions Example/MBMotion/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
<segue destination="BsW-nu-SNI" kind="show" identifier="fromHomeToWeb" id="xSd-Ts-Q90"/>
<segue destination="SSP-wq-jgf" kind="show" identifier="fromHomeToMBMotionActionSheet" id="hGa-UQ-8LG"/>
<segue destination="xKP-tq-IXh" kind="show" identifier="fromHomeToMBEyeLoading" id="bvd-io-K1P"/>
<segue destination="zNY-TZ-0Py" kind="show" identifier="fromHomeToMBMotionHamburgButton" id="lpQ-K7-4MX"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
Expand Down Expand Up @@ -125,7 +126,40 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="M75-3t-ZiS" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1346" y="574"/>
<point key="canvasLocation" x="1345" y="411"/>
</scene>
<!--MBMotionHamburgButton-->
<scene sceneID="SC3-b5-4LJ">
<objects>
<viewController id="zNY-TZ-0Py" customClass="MBMotionHamburgButtonViewController" customModule="MBMotion_Example" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="UVH-xx-OOF"/>
<viewControllerLayoutGuide type="bottom" id="mVA-D1-msc"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="ibQ-LJ-Z2R">
<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="cBs-Z2-fCW" customClass="MBMotionHamburgButton" customModule="MBMotion">
<rect key="frame" x="162" y="308.5" width="50" height="50"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="IKY-MV-meN"/>
<constraint firstAttribute="width" constant="50" id="qGC-85-0IX"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="0.1647058824" green="0.2156862745" blue="0.26274509800000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="cBs-Z2-fCW" firstAttribute="centerY" secondItem="ibQ-LJ-Z2R" secondAttribute="centerY" id="7da-XH-cWm"/>
<constraint firstItem="cBs-Z2-fCW" firstAttribute="centerX" secondItem="ibQ-LJ-Z2R" secondAttribute="centerX" id="PAo-ut-BsK"/>
</constraints>
</view>
<navigationItem key="navigationItem" title="MBMotionHamburgButton" id="aPY-iy-8bU" customClass="MBNavigationItem" customModule="MBMotion_Example" customModuleProvider="target"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Qs4-bd-s4t" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2031" y="411"/>
</scene>
<!--Eyeloading-->
<scene sceneID="nO7-cj-ewT">
Expand All @@ -144,7 +178,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Qr2-4J-wCZ" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1345" y="1242"/>
<point key="canvasLocation" x="1345" y="1057"/>
</scene>
</scenes>
<resources>
Expand Down
2 changes: 1 addition & 1 deletion Example/MBMotion/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ViewController: UIViewController,MBTableHeaderViewDelegate {

@IBOutlet var tableView: UITableView!

var items = ["MBMotionActionSheet", "MBEyeLoading"]
var items = ["MBMotionActionSheet", "MBEyeLoading", "MBMotionHamburgButton"]
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
[![License](https://img.shields.io/cocoapods/l/MBMotion.svg?style=flat)](http://cocoapods.org/pods/MBMotion)
[![Platform](https://img.shields.io/cocoapods/p/MBMotion.svg?style=flat)](http://cocoapods.org/pods/MBMotion)

## List

|Name|Class|Demo|Remark|
|:-:|:-:|:-:|:-:|
|ActionSheet|MBMotionActionSheet| ![](https://github.com/mmoaay/MBMotion/blob/master/Demo/mbmotion_actionsheet.gif) | ![](https://github.com/mmoaay/MBMotion/blob/master/Demo/mbmotion_actionsheet_origin.gif)|
|Eye Loading|MBEyeLoading| ![](https://github.com/mmoaay/MBMotion/blob/master/Demo/mbmotion_mbmotion_eyeloading.gif) | - |
|Hamburg Button|MBMotionHamburgButton| ![](https://github.com/mmoaay/MBMotion/blob/master/Demo/mbmotion_hamburgbutton.gif) | - |

## Example

To run the example project, clone the repo, and run `pod install` from the Example directory first.
Expand Down

0 comments on commit e5f2c21

Please sign in to comment.