Skip to content

Commit 07e2b17

Browse files
committed
Merge tag '1.5.0' into develop
- Fix iOS demo app failing and style on iOS 13 - Fix lint warnings and build errors in demo app - Add extra metadata to podspec - Deprecated messages to renamed - Add Joe Mattiello into Podspec authors for publishing - Fix pod lib lint failures - Update Podspec imports to match source imports - Use more minimal import - Remove Swift files from framework bundle products - Remove access modifier warnings (#616) - GitIgnore xcode log files - Docs - Run jazzy against new spec - Docs - Update jazzy config - Bump version to 1.5.0 - Set theme jekyll-theme-midnight - Use custom snapshot for views that implements HeroCustomSnapshotView (#541) - Keep using default navigation animation direction with RTL languages (#520) - Hidden subviews not taken in account in optimized snapshot type (#521) - Update Collection 2.0 (#553) Signed-off-by: Joe Mattiello <git@joemattiello.com> # gpg: Signature made Mon Oct 28 21:28:30 2019 EDT # gpg: using RSA key 8D361039DCE5C34A90E4E466A4679EBF9DE83365 # gpg: Good signature from "Joseph Mattiello <mail@joemattiello.com>" [ultimate] # gpg: aka "Joseph Mattiello <git@joemattiello.com>" [ultimate] # gpg: aka "Joseph Mattiello <joe@provenance-emu.com>" [ultimate] # gpg: aka "Joseph Mattiello <jmattiello@newscorp.com>" [ultimate] # gpg: aka "Joseph Mattiello (Public Git repo commit identity) <git@joemattiello.com>" [ultimate] # Conflicts: # Sources/Extensions/UIView+Hero.swift # Sources/Extensions/UIViewController+Hero.swift
2 parents a586b9f + 87b57a1 commit 07e2b17

File tree

174 files changed

+63285
-858
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+63285
-858
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,5 @@ fastlane/test_output
6767

6868
# Gitbook
6969
node_modules
70-
_book
70+
_book
71+
xcodebuild.log

.jazzy.yaml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,27 @@
1+
# ---- About ----
12
module: Hero
2-
author: Luke Zhao
3-
author_url: http://lkzhao.com
4-
github_url: https://github.com/lkzhao/Hero
5-
swift_version: 3.0.2
6-
source_directory: Examples
3+
module_version: 1.5.0
4+
author: HeroTransitions
75
readme: README.md
8-
theme: fullwidth
6+
copyright: 'See [license](https://github.com/HeroTransitions/Hero/blob/develop/LICENSE) for more details.'
7+
8+
# ---- URLs ----
9+
author_url: https://herotransitions.github.io/
10+
dash_url: https://herotransitions.github.io/docsets/ScreenKitFramework.xml
11+
github_url: https://github.com/HeroTransitions/Hero
12+
github_file_prefix: https://github.com/HeroTransitions/Hero/tree/version/1.5.0/
13+
14+
# ---- Sources ----
15+
podspec: Hero.podspec
16+
17+
# ---- Generation ----
18+
clean: true
19+
output: docs
20+
min_acl: public
21+
hide_documentation_coverage: false
22+
skip_undocumented: false
23+
objc: false
24+
swift_version: 5.0.1
25+
26+
# ---- Formatting ----
27+
theme: fullwidth

.swift-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The changelog for `Hero`. Also see the [releases](https://github.com/HeroTransit
44

55
--------------------------------------
66

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

99
### Added
1010

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

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

3231
### Fixed

Examples/AppStoreCardExample.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,12 @@ class AppStoreViewController2: ExampleBaseViewController {
219219
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.
220220
"""
221221

222-
contentCard.backgroundColor = .white
222+
if #available(iOS 13.0, *) {
223+
contentCard.backgroundColor = .systemBackground
224+
} else {
225+
contentCard.backgroundColor = .white
226+
}
227+
223228
contentCard.clipsToBounds = true
224229

225230
contentCard.addSubview(contentView)

Examples/ExampleBaseViewController.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ class ExampleBaseViewController: UIViewController {
1414

1515
override func viewDidLoad() {
1616
super.viewDidLoad()
17-
view.backgroundColor = .white
17+
if #available(iOS 13.0, *) {
18+
view.backgroundColor = .systemBackground
19+
} else {
20+
view.backgroundColor = .white
21+
}
1822
view.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(onTap)))
1923

2024
dismissButton.setTitle("Back", for: .normal)

Examples/MainViewController.swift

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ class MainViewController: UIViewController {
99

1010
override func viewDidLoad() {
1111
super.viewDidLoad()
12-
view.backgroundColor = .white
12+
if #available(iOS 13.0, *) {
13+
view.backgroundColor = UIColor.systemBackground
14+
} else {
15+
view.backgroundColor = .white
16+
}
1317

1418
view.addSubview(collectionView)
1519

@@ -27,6 +31,13 @@ class MainViewController: UIViewController {
2731
let viewSource = ClosureViewSource { (label: UILabel, data: SourceData, index) in
2832
label.text = "\(index + 1). \(data.1)"
2933
label.textAlignment = .center
34+
if #available(iOS 13.0, *) {
35+
label.textColor = .label
36+
label.backgroundColor = .systemBackground
37+
} else {
38+
label.textColor = .darkText
39+
label.backgroundColor = .white
40+
}
3041
label.layer.borderColor = UIColor.gray.cgColor
3142
label.layer.borderWidth = 0.5
3243
label.layer.cornerRadius = 8
@@ -51,22 +62,13 @@ class MainViewController: UIViewController {
5162
imageView.contentMode = .scaleAspectFit
5263

5364
let imageProvider = SimpleViewProvider(views: [imageView], sizeStrategy: (.fill, .fit))
54-
55-
let legacyButton = UIButton(type: .system)
56-
legacyButton.setTitle("Legacy Examples", for: .normal)
57-
legacyButton.addTarget(self, action: #selector(showLegacy), for: .touchUpInside)
58-
let legacyExamplesProvider = SimpleViewProvider(views: [legacyButton], sizeStrategy: (.fill, .fit))
59-
65+
6066
collectionView.provider = ComposedProvider(
6167
layout: FlowLayout(lineSpacing: 10).inset(by: UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)),
62-
sections: [imageProvider, examplesProvider, legacyExamplesProvider]
68+
sections: [imageProvider, examplesProvider]
6369
)
6470
}
65-
66-
@objc func showLegacy() {
67-
hero.replaceViewController(with: viewController(forStoryboardName: "Main"))
68-
}
69-
71+
7072
override func viewDidLayoutSubviews() {
7173
super.viewDidLayoutSubviews()
7274
collectionView.frame = view.bounds

Examples/MatchExample.swift

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class MatchExampleViewController1: ExampleBaseViewController {
5151
class MatchExampleViewController2: ExampleBaseViewController {
5252
let redView = UIView()
5353
let blackView = UIView()
54-
let whiteView = UIView()
54+
let backgroundView = UIView()
5555

5656
override func viewDidLoad() {
5757
super.viewDidLoad()
@@ -65,19 +65,23 @@ class MatchExampleViewController2: ExampleBaseViewController {
6565
blackView.cornerRadius = 8
6666
view.addSubview(blackView)
6767

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

7680
override func viewDidLayoutSubviews() {
7781
super.viewDidLayoutSubviews()
7882
redView.frame = view.bounds
7983
blackView.frame.size = CGSize(width: 250, height: 60)
8084
blackView.center = CGPoint(x: view.bounds.midX, y: 130)
81-
whiteView.frame = CGRect(x: (view.bounds.width - 250) / 2, y: 180, width: 250, height: view.bounds.height - 320)
85+
backgroundView.frame = CGRect(x: (view.bounds.width - 250) / 2, y: 180, width: 250, height: view.bounds.height - 320)
8286
}
8387
}

Examples/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,9 @@
103103
"scale" : "2x"
104104
},
105105
{
106-
"idiom" : "ios-marketing",
107106
"size" : "1024x1024",
107+
"idiom" : "ios-marketing",
108+
"filename" : "Icon-1024.png",
108109
"scale" : "1x"
109110
}
110111
],
194 KB
Loading

0 commit comments

Comments
 (0)