Skip to content

Commit

Permalink
暂时移除 Hero
Browse files Browse the repository at this point in the history
  • Loading branch information
LiulietLee committed Oct 21, 2017
1 parent 6a36f7f commit 50595cc
Show file tree
Hide file tree
Showing 75 changed files with 1,149 additions and 6,657 deletions.
4 changes: 1 addition & 3 deletions BCD.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-BCD/Pods-BCD-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework",
"${BUILT_PRODUCTS_DIR}/Hero/Hero.framework",
"${BUILT_PRODUCTS_DIR}/MaterialKit/MaterialKit.framework",
"${BUILT_PRODUCTS_DIR}/Protobuf/Protobuf.framework",
"${BUILT_PRODUCTS_DIR}/SWRevealViewController/SWRevealViewController.framework",
Expand All @@ -491,7 +490,6 @@
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleToolboxForMac.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hero.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MaterialKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Protobuf.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SWRevealViewController.framework",
Expand Down Expand Up @@ -768,7 +766,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
Expand Down
4 changes: 2 additions & 2 deletions BCD/AnimateView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ extension UIView {
let delay = Double(index) * interval
if let _ = view as? LoadingView { continue }
if let animatable = view as? Animatable {
animatable.animateViews(animationType: type, delay: delay)
animatable.animateViews(animations: [type], delay: delay)
} else {
view.animate(animationType: type, delay: delay)
view.animate(animations: [type], delay: delay)
}
}
}
Expand Down
7 changes: 3 additions & 4 deletions BCD/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13174"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
Expand Down Expand Up @@ -502,7 +501,7 @@
<userDefinedRuntimeAttribute type="string" keyPath="heroID" value="cover"/>
</userDefinedRuntimeAttributes>
<connections>
<segue destination="c48-nJ-AAz" kind="presentation" id="3xr-kp-XcO"/>
<segue destination="c48-nJ-AAz" kind="show" id="3xr-kp-XcO"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="p9B-rN-u5C">
Expand Down Expand Up @@ -616,9 +615,9 @@
<action selector="zoom:" destination="c48-nJ-AAz" id="GKQ-Al-5BO"/>
</connections>
</pinchGestureRecognizer>
<tapGestureRecognizer id="vx0-us-ZPc">
<tapGestureRecognizer numberOfTapsRequired="2" id="vx0-us-ZPc">
<connections>
<action selector="goBack:" destination="c48-nJ-AAz" id="d6R-c4-89g"/>
<action selector="zoomIn:" destination="c48-nJ-AAz" id="yX8-xa-Th8"/>
</connections>
</tapGestureRecognizer>
</objects>
Expand Down
1 change: 0 additions & 1 deletion BCD/ColoredNavController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//

import UIKit
import Hero

class ColoredNavController: UINavigationController {
var navbarTintColor: UIColor { return .black }
Expand Down
15 changes: 12 additions & 3 deletions BCD/DetailViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
//

import UIKit
import ViewAnimator

class DetailViewController: UIViewController {

var image: UIImage?
fileprivate var isZoomedIn = false
@IBOutlet weak var imageView: UIImageView!
@IBOutlet weak var yConstraint: NSLayoutConstraint!
@IBOutlet weak var xConstraint: NSLayoutConstraint!
Expand All @@ -26,6 +26,9 @@ class DetailViewController: UIViewController {
} else {
print("no image here")
}

let type = AnimationType.from(direction: .right, offset: ViewAnimatorConfig.offset)
view.doAnimation(type: type)
}

override func viewWillDisappear(_ animated: Bool) {
Expand All @@ -48,7 +51,13 @@ class DetailViewController: UIViewController {
sender.scale = 1.0
}

@IBAction func goBack(_ sender: UITapGestureRecognizer) {
self.dismiss(animated: true, completion: nil)
@IBAction func zoomIn(_ sender: UITapGestureRecognizer) {
widthConstraint.constant *= 2.0
xConstraint.constant *= 2.0
yConstraint.constant *= 2.0
UIView.animate(withDuration: 0.6) {
self.view.layoutIfNeeded()
}
}

}
5 changes: 4 additions & 1 deletion BCD/ImageViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ class ImageViewController: UIViewController, VideoCoverDelegate {
}

animateView()
dataModel.isNeedHid(imageView.image!)
}
}

Expand Down Expand Up @@ -190,6 +189,10 @@ class ImageViewController: UIViewController, VideoCoverDelegate {
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
let vc = segue.destination as! DetailViewController
vc.image = imageView.image!

let backItem = UIBarButtonItem()
backItem.title = ""
navigationItem.backBarButtonItem = backItem
}

}
4 changes: 2 additions & 2 deletions BCD/UIImageToCVPixelBuffer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ extension UIImage {

let rects = [
CGRect(x: 0, y: 0, width: h, height: h),
CGRect(x: 0.5 * (w - h), y: 0, width: h, height: h),
CGRect(x: w - h, y: 0, width: h, height: h)
CGRect(x: w - h, y: 0, width: h, height: h),
CGRect(x: 0.5 * (w - h), y: 0, width: h, height: h)
]

var results = [UIImage?]()
Expand Down
1 change: 0 additions & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ target 'BCD' do
pod 'SWRevealViewController', :git => 'https://github.com/John-Lluch/SWRevealViewController.git'
pod 'MaterialKit', :git => 'https://github.com/ApolloZhu/MaterialKit.git'
pod 'ViewAnimator'
pod 'Hero'
end
23 changes: 10 additions & 13 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
PODS:
- Firebase/Core (4.3.0):
- Firebase/Core (4.4.0):
- FirebaseAnalytics (= 4.0.4)
- FirebaseCore (= 4.0.8)
- FirebaseCore (= 4.0.9)
- FirebaseAnalytics (4.0.4):
- FirebaseCore (~> 4.0)
- FirebaseInstanceID (~> 2.0)
- GoogleToolboxForMac/NSData+zlib (~> 2.1)
- nanopb (~> 0.3)
- FirebaseCore (4.0.8):
- FirebaseCore (4.0.9):
- GoogleToolboxForMac/NSData+zlib (~> 2.1)
- nanopb (~> 0.3)
- FirebaseInstanceID (2.0.4)
- FirebaseInstanceID (2.0.5)
- FirebaseMessaging (2.0.0):
- FirebaseAnalytics (~> 4.0)
- FirebaseCore (~> 4.0)
Expand All @@ -22,7 +22,6 @@ PODS:
- GoogleToolboxForMac/Defines (= 2.1.3)
- GoogleToolboxForMac/NSData+zlib (2.1.3):
- GoogleToolboxForMac/Defines (= 2.1.3)
- Hero (0.3.6)
- MaterialKit (0.6.2)
- nanopb (0.3.8):
- nanopb/decode (= 0.3.8)
Expand All @@ -31,13 +30,12 @@ PODS:
- nanopb/encode (0.3.8)
- Protobuf (3.4.0)
- SWRevealViewController (2.4.0)
- ViewAnimator (1.0.0)
- ViewAnimator (1.0.1)

DEPENDENCIES:
- Firebase/Core
- FirebaseInstanceID
- FirebaseMessaging (= 2.0.0)
- Hero
- MaterialKit (from `https://github.com/ApolloZhu/MaterialKit.git`)
- SWRevealViewController (from `https://github.com/John-Lluch/SWRevealViewController.git`)
- ViewAnimator
Expand All @@ -57,19 +55,18 @@ CHECKOUT OPTIONS:
:git: https://github.com/John-Lluch/SWRevealViewController.git

SPEC CHECKSUMS:
Firebase: 83283761a1ef6dc9846e03d08059f51421afbd65
Firebase: 3e92884a63e8f76d107c43a67d2ab9071e1eda10
FirebaseAnalytics: 722b53c7b32bfc7806b06e0093a2f5180d4f2c5a
FirebaseCore: 69b1a5ac5f857ba6d5fd9d5fe794f4786dd5e579
FirebaseInstanceID: 70c2b877e9338971b2429ea5a4293df6961aa44e
FirebaseCore: ebe73f64302705e693b1de9919a76edbdd17a19d
FirebaseInstanceID: f2b688c66b972f30d7fa9f5f9f91455454a03b47
FirebaseMessaging: 227406c05b0dc9290702d2e9f18ab5528f0c2cf2
GoogleToolboxForMac: 2501e2ad72a52eb3dfe7bd9aee7dad11b858bd20
Hero: d3c6f4dd80cdcdbb339be64e57ae3b5c3ab9938c
MaterialKit: 7a21f9c5d9af43afa20d3fa25054bef8087ced24
nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3
Protobuf: 03eef2ee0b674770735cf79d9c4d3659cf6908e8
SWRevealViewController: b653f339865208c97be99a24876545f5be0cc4bb
ViewAnimator: ae94bb7d19728ecc061465b00f491bfd855053cd
ViewAnimator: a094d13bc86e868e908d33e524fcb58a4ddcf98e

PODFILE CHECKSUM: 6ca261e692d64db8448a9dc003286a8b28086a7a
PODFILE CHECKSUM: 53f6913e5ad7e64253a93099edcf790c3b0e1a53

COCOAPODS: 1.3.1
Binary file modified Pods/FirebaseCore/Frameworks/FirebaseCore.framework/FirebaseCore
Binary file not shown.

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

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

3 changes: 3 additions & 0 deletions Pods/FirebaseInstanceID/CHANGELOG.md
100755 → 100644

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

Binary file not shown.

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

Empty file modified Pods/FirebaseInstanceID/README.md
100755 → 100644
Empty file.
21 changes: 0 additions & 21 deletions Pods/Hero/LICENSE

This file was deleted.

124 changes: 0 additions & 124 deletions Pods/Hero/README.md

This file was deleted.

Loading

0 comments on commit 50595cc

Please sign in to comment.