Skip to content

Commit

Permalink
Merge branch 'release/1.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeMatt committed Oct 29, 2019
2 parents 71d0934 + 991f337 commit 87b57a1
Show file tree
Hide file tree
Showing 176 changed files with 63,355 additions and 935 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,5 @@ fastlane/test_output

# Gitbook
node_modules
_book
_book
xcodebuild.log
31 changes: 25 additions & 6 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
# ---- About ----
module: Hero
author: Luke Zhao
author_url: http://lkzhao.com
github_url: https://github.com/lkzhao/Hero
swift_version: 3.0.2
source_directory: Examples
module_version: 1.5.0
author: HeroTransitions
readme: README.md
theme: fullwidth
copyright: 'See [license](https://github.com/HeroTransitions/Hero/blob/develop/LICENSE) for more details.'

# ---- URLs ----
author_url: https://herotransitions.github.io/
dash_url: https://herotransitions.github.io/docsets/ScreenKitFramework.xml
github_url: https://github.com/HeroTransitions/Hero
github_file_prefix: https://github.com/HeroTransitions/Hero/tree/version/1.5.0/

# ---- Sources ----
podspec: Hero.podspec

# ---- Generation ----
clean: true
output: docs
min_acl: public
hide_documentation_coverage: false
skip_undocumented: false
objc: false
swift_version: 5.0.1

# ---- Formatting ----
theme: fullwidth
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The changelog for `Hero`. Also see the [releases](https://github.com/HeroTransit

--------------------------------------

## Upcoming release
## [1.5.0](https://github.com/HeroTransitions/Hero/releases/tag/1.5.0)

### Added

Expand All @@ -26,7 +26,6 @@ The changelog for `Hero`. Also see the [releases](https://github.com/HeroTransit
- Added support for Swift 4.2.
[#534](https://github.com/HeroTransitions/Hero/pull/534) by [@rennarda](https://github.com/rennarda)


## [1.3.1](https://github.com/HeroTransitions/Hero/releases/tag/1.3.1)

### Fixed
Expand Down
7 changes: 6 additions & 1 deletion Examples/AppStoreCardExample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,12 @@ class AppStoreViewController2: ExampleBaseViewController {
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent neque est, hendrerit vitae nibh ultrices, accumsan elementum ante. Phasellus fringilla sapien non lorem consectetur, in ullamcorper tortor condimentum. Nulla tincidunt iaculis maximus. Sed ut urna urna. Nulla at sem vel neque scelerisque imperdiet. Donec ornare luctus dapibus. Donec aliquet ante augue, at pellentesque ipsum mollis eget. Cras vulputate mauris ac eleifend sollicitudin. Vivamus ut posuere odio. Suspendisse vulputate sem vel felis vehicula iaculis. Fusce sagittis, eros quis consequat tincidunt, arcu nunc ornare nulla, non egestas dolor ex at ipsum. Cras et massa sit amet quam imperdiet viverra. Mauris vitae finibus nibh, ac vulputate sapien.
"""

contentCard.backgroundColor = .white
if #available(iOS 13.0, *) {
contentCard.backgroundColor = .systemBackground
} else {
contentCard.backgroundColor = .white
}

contentCard.clipsToBounds = true

contentCard.addSubview(contentView)
Expand Down
6 changes: 5 additions & 1 deletion Examples/ExampleBaseViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ class ExampleBaseViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .white
if #available(iOS 13.0, *) {
view.backgroundColor = .systemBackground
} else {
view.backgroundColor = .white
}
view.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(onTap)))

dismissButton.setTitle("Back", for: .normal)
Expand Down
28 changes: 15 additions & 13 deletions Examples/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ class MainViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .white
if #available(iOS 13.0, *) {
view.backgroundColor = UIColor.systemBackground
} else {
view.backgroundColor = .white
}

view.addSubview(collectionView)

Expand All @@ -27,6 +31,13 @@ class MainViewController: UIViewController {
let viewSource = ClosureViewSource { (label: UILabel, data: SourceData, index) in
label.text = "\(index + 1). \(data.1)"
label.textAlignment = .center
if #available(iOS 13.0, *) {
label.textColor = .label
label.backgroundColor = .systemBackground
} else {
label.textColor = .darkText
label.backgroundColor = .white
}
label.layer.borderColor = UIColor.gray.cgColor
label.layer.borderWidth = 0.5
label.layer.cornerRadius = 8
Expand All @@ -51,22 +62,13 @@ class MainViewController: UIViewController {
imageView.contentMode = .scaleAspectFit

let imageProvider = SimpleViewProvider(views: [imageView], sizeStrategy: (.fill, .fit))

let legacyButton = UIButton(type: .system)
legacyButton.setTitle("Legacy Examples", for: .normal)
legacyButton.addTarget(self, action: #selector(showLegacy), for: .touchUpInside)
let legacyExamplesProvider = SimpleViewProvider(views: [legacyButton], sizeStrategy: (.fill, .fit))


collectionView.provider = ComposedProvider(
layout: FlowLayout(lineSpacing: 10).inset(by: UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)),
sections: [imageProvider, examplesProvider, legacyExamplesProvider]
sections: [imageProvider, examplesProvider]
)
}

@objc func showLegacy() {
hero.replaceViewController(with: viewController(forStoryboardName: "Main"))
}


override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
collectionView.frame = view.bounds
Expand Down
16 changes: 10 additions & 6 deletions Examples/MatchExample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class MatchExampleViewController1: ExampleBaseViewController {
class MatchExampleViewController2: ExampleBaseViewController {
let redView = UIView()
let blackView = UIView()
let whiteView = UIView()
let backgroundView = UIView()

override func viewDidLoad() {
super.viewDidLoad()
Expand All @@ -65,19 +65,23 @@ class MatchExampleViewController2: ExampleBaseViewController {
blackView.cornerRadius = 8
view.addSubview(blackView)

whiteView.backgroundColor = .white
whiteView.cornerRadius = 8
if #available(iOS 13.0, *) {
backgroundView.backgroundColor = .systemBackground
} else {
backgroundView.backgroundColor = .white
}
backgroundView.cornerRadius = 8
// .useGlobalCoordinateSpace modifier is needed here otherwise it will be covered by redView during transition.
// see http://lkzhao.com/2018/03/02/hero-useglobalcoordinatespace-explained.html for detail
whiteView.hero.modifiers = [.translate(y: 500), .useGlobalCoordinateSpace]
view.addSubview(whiteView)
backgroundView.hero.modifiers = [.translate(y: 500), .useGlobalCoordinateSpace]
view.addSubview(backgroundView)
}

override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
redView.frame = view.bounds
blackView.frame.size = CGSize(width: 250, height: 60)
blackView.center = CGPoint(x: view.bounds.midX, y: 130)
whiteView.frame = CGRect(x: (view.bounds.width - 250) / 2, y: 180, width: 250, height: view.bounds.height - 320)
backgroundView.frame = CGRect(x: (view.bounds.width - 250) / 2, y: 180, width: 250, height: view.bounds.height - 320)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-1024.png",
"scale" : "1x"
}
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

16 changes: 8 additions & 8 deletions Examples/Resources/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<?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">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15400" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15404"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<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"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="ahU-2K-RQA"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
Expand Down
2 changes: 1 addition & 1 deletion Examples/Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
Expand Down
12 changes: 6 additions & 6 deletions Examples/Resources/UIKit+HeroExamples.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import UIKit

public extension UIView {
@IBInspectable public var cornerRadius: CGFloat {
@IBInspectable var cornerRadius: CGFloat {
get {
return layer.cornerRadius
}
Expand All @@ -32,7 +32,7 @@ public extension UIView {
layer.cornerRadius = newValue
}
}
@IBInspectable public var shadowRadius: CGFloat {
@IBInspectable var shadowRadius: CGFloat {
get {
return layer.shadowRadius
}
Expand All @@ -41,7 +41,7 @@ public extension UIView {
layer.shadowRadius = newValue
}
}
@IBInspectable public var shadowOpacity: Float {
@IBInspectable var shadowOpacity: Float {
get {
return layer.shadowOpacity
}
Expand All @@ -50,7 +50,7 @@ public extension UIView {
layer.shadowOpacity = newValue
}
}
@IBInspectable public var shadowColor: UIColor? {
@IBInspectable var shadowColor: UIColor? {
get {
return layer.shadowColor != nil ? UIColor(cgColor: layer.shadowColor!) : nil
}
Expand All @@ -59,7 +59,7 @@ public extension UIView {
layer.shadowColor = newValue?.cgColor
}
}
@IBInspectable public var shadowOffset: CGSize {
@IBInspectable var shadowOffset: CGSize {
get {
return layer.shadowOffset
}
Expand All @@ -68,7 +68,7 @@ public extension UIView {
layer.shadowOffset = newValue
}
}
@IBInspectable public var zPosition: CGFloat {
@IBInspectable var zPosition: CGFloat {
get {
return layer.zPosition
}
Expand Down
50 changes: 32 additions & 18 deletions Hero.podspec
Original file line number Diff line number Diff line change
@@ -1,22 +1,36 @@
# frozen_string_literal: true

Pod::Spec.new do |s|
s.name = "Hero"
s.version = "1.4.0"
s.summary = "Elegant transition library for iOS"

s.description = <<-DESC
Hero is a library for building iOS view controller transitions. It provides a declarative layer on top of the UIKit's cumbersome transition APIs. Making custom transitions an easy task for developers.
DESC

s.homepage = "https://github.com/HeroTransitions/Hero"
s.screenshots = "https://github.com/HeroTransitions/Hero/blob/master/Resources/Hero.png?raw=true"
s.license = 'MIT'
s.author = { "Luke" => "[email protected]" }
s.source = { :git => "https://github.com/HeroTransitions/Hero.git", :tag => s.version.to_s }

s.ios.deployment_target = '8.0'
s.tvos.deployment_target = '9.0'

s.ios.frameworks = 'UIKit', 'Foundation'
s.name = 'Hero'
s.version = '1.5.0'
s.summary = 'Elegant transition library for iOS'

s.description = <<-DESC
Hero is a library for building iOS view controller transitions.
It provides a declarative layer on top of the UIKit's cumbersome transition APIs.
Making custom transitions an easy task for developers.
DESC

s.homepage = 'https://github.com/HeroTransitions/Hero'
s.screenshots = 'https://github.com/HeroTransitions/Hero/blob/master/Resources/Hero.png?raw=true'
s.documentation_url = 'https://herotransitions.github.io/Hero/'
s.screenshots = [ https://git.io/JeRkv, https://git.io/JeRke, https://git.io/JeRkf, https://git.io/JeRkJ]
s.license = { :type => 'MIT' }
s.author = {
'Luke' => '[email protected]',
'Joe Mattiello' => '[email protected]'
}
s.source = { git: 'https://github.com/HeroTransitions/Hero.git', tag: s.version.to_s }

s.cocoapods_version = '>= 1.4.0'

s.ios.deployment_target = '8.0'
s.tvos.deployment_target = '9.0'

s.ios.frameworks = 'UIKit', 'Foundation', 'QuartzCore', 'CoreGraphics', 'CoreMedia'
s.tvos.frameworks = 'UIKit', 'Foundation', 'QuartzCore', 'CoreGraphics', 'CoreMedia'

s.swift_version = '4.2'

s.requires_arc = true

Expand Down
Loading

0 comments on commit 87b57a1

Please sign in to comment.