Skip to content

Commit d5ec6e9

Browse files
committed
Remove scroll behavior because iOS 16 support it from box.
1 parent cb343db commit d5ec6e9

File tree

11 files changed

+6
-187
lines changed

11 files changed

+6
-187
lines changed

Example App/NativeUIKit.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example App/iOS Example/Scenes/RootController.swift

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,7 @@ import UIKit
2323
import SparrowKit
2424
import NativeUIKit
2525

26-
class RootController: NativeScrollController {
26+
class RootController: UIViewController {
2727

28-
override init() {
29-
super.init(navigationScrollBehavior: .hidable)
30-
}
3128

32-
required init?(coder: NSCoder) {
33-
fatalError("init(coder:) has not been implemented")
34-
}
35-
36-
let actionToolBarView = NativeLargeActionToolBarView().do {
37-
$0.actionButton.setTitle("Action Button")
38-
$0.footerLabel.text = "Here footer text and it provided my developer and maybe some lines even."
39-
}
40-
41-
override func viewDidLoad() {
42-
super.viewDidLoad()
43-
44-
if let navigationController = self.navigationController as? NativeNavigationController {
45-
navigationController.mimicrateToolBarView = actionToolBarView
46-
}
47-
48-
scrollView.contentSize = .init(width: view.frame.width, height: 1000)
49-
}
5029
}

NativeUIKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = 'NativeUIKit'
4-
s.version = '1.0.8'
4+
s.version = '1.0.9'
55
s.summary = 'Mimicrated views and controls to native Apple appearance.'
66
s.homepage = 'https://github.com/ivanvorobei/NativeUIKit'
77
s.source = { :git => 'https://github.com/ivanvorobei/NativeUIKit.git', :tag => s.version }

Sources/NativeUIKit/Controllers/NativeScrollController.swift

Lines changed: 0 additions & 64 deletions
This file was deleted.

Sources/NativeUIKit/Controllers/NativeHeaderController.swift renamed to Sources/NativeUIKit/Controllers/Scroll/NativeHeaderController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import UIKit
2424
import SparrowKit
2525

26-
open class NativeHeaderController: NativeScrollController {
26+
open class NativeHeaderController: SPScrollController {
2727

2828
// MARK: - Views
2929

@@ -33,7 +33,7 @@ open class NativeHeaderController: NativeScrollController {
3333

3434
public init(image: UIImage?, title: String, subtitle: String) {
3535
self.headerView = NativeModalHeaderView(image: image, title: title, subtitle: subtitle)
36-
super.init(navigationScrollBehavior: .hidable)
36+
super.init()
3737
}
3838

3939
public required init?(coder: NSCoder) {

Sources/NativeUIKit/Controllers/NativeHeaderTableController.swift renamed to Sources/NativeUIKit/Controllers/Table/NativeHeaderTableController.swift

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,10 @@ import SPDiffable
2727
@available(iOS 13.0, *)
2828
open class NativeHeaderTableController: SPDiffableTableController {
2929

30-
// MARK: - Data
31-
32-
private var scrollWorker: NativeNavigationScrollWorker!
33-
3430
// MARK: - Init
3531

36-
init(headerView: UIView, navigationScrollBehavior: NativeNavigationScrollBehavior) {
32+
init(headerView: UIView) {
3733
super.init(style: .insetGrouped)
38-
scrollWorker = NativeNavigationScrollWorker(scrollView: self.tableView, scrollBehavior: navigationScrollBehavior)
3934
tableView.tableHeaderView = HeaderContainerView(contentView: headerView)
4035
}
4136

@@ -62,14 +57,6 @@ open class NativeHeaderTableController: SPDiffableTableController {
6257

6358
private var cachedHeaderHeight: CGFloat? = nil
6459

65-
// MARK: - UIScrollViewDelegate
66-
67-
open override func scrollViewDidScroll(_ scrollView: UIScrollView) {
68-
if scrollView == self.tableView {
69-
scrollWorker.scrollViewDidScroll()
70-
}
71-
}
72-
7360
// MARK: - Views
7461

7562
class HeaderContainerView: SPView {

Sources/NativeUIKit/Controllers/Workers/NativeNavigationScrollWorker.swift

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)