Skip to content

Commit 5117a74

Browse files
authored
2.0 - better stability (#46)
* ⚡ WIP * ⚡ WIP * 🌲 Update * Rename * Update * Clean * 🌲 Update * 🌲 Update * Rename * Clean * 🌲 Update * Cleanup trackingState * 🌲 Update * clean up * Update Position struct * 🌲 Update * Update state * make scrolling better * Fix scrollView * Cleanup * 🌲 Update * wrapping up the configuration * 🌲 Update * Update workflow file * Update Demo * 🌲 Update * Update scroll indicator visibility * update animation * Update self-sizing update * Fix strange animation * Add text input demo * 🌲 Update * fix pan-direction * 🌲 Update * Update Logger * Add handlers
1 parent 62a41bd commit 5117a74

26 files changed

+2372
-1258
lines changed

.github/workflows/CocoaPods-deploy.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ name: cocoapods-deploy
33
on:
44
push:
55
tags:
6-
- '*'
6+
- "*"
77

88
jobs:
99
build:
10-
runs-on: macOS-latest
10+
runs-on: macOS-11
1111
steps:
12-
- uses: maxim-lobanov/setup-xcode@v1.1
12+
- uses: maxim-lobanov/setup-xcode@v1
1313
with:
14-
xcode-version: '12.3'
15-
- uses: actions/checkout@v2
14+
xcode-version: "12.5"
15+
- uses: actions/checkout@v2
1616
- name: Deploy
1717
env:
1818
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}

.github/workflows/CocoaPods.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ on: [push]
44

55
jobs:
66
build:
7-
8-
runs-on: macos-latest
7+
runs-on: macos-11
98

109
steps:
11-
- uses: maxim-lobanov/setup-xcode@v1.1
12-
with:
13-
xcode-version: "12.3"
14-
- uses: actions/checkout@v2
15-
- name: Lint Cocoapods
16-
run: pod lib lint --allow-warnings
10+
- uses: maxim-lobanov/setup-xcode@v1
11+
with:
12+
xcode-version: "12.5"
13+
- uses: actions/checkout@v2
14+
- name: Lint Cocoapods
15+
run: pod lib lint --allow-warnings

.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Rideau.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = "Rideau"
3-
s.version = '1.3.0'
4-
s.swift_version = "5.3"
3+
s.version = '2.0.0'
4+
s.swift_version = "5.4"
55
s.summary = "A vertical drawer with fluid user interface."
66

77
s.homepage = "https://github.com/muukii/Rideau"

Rideau.xcodeproj/project.pbxproj

+55-15
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1250"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "4B2B870D26BA88D100887DC8"
18+
BuildableName = "RideauDemo2.app"
19+
BlueprintName = "RideauDemo2"
20+
ReferencedContainer = "container:Rideau.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
<BuildableProductRunnable
44+
runnableDebuggingMode = "0">
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "4B2B870D26BA88D100887DC8"
48+
BuildableName = "RideauDemo2.app"
49+
BlueprintName = "RideauDemo2"
50+
ReferencedContainer = "container:Rideau.xcodeproj">
51+
</BuildableReference>
52+
</BuildableProductRunnable>
53+
<EnvironmentVariables>
54+
<EnvironmentVariable
55+
key = "RIDEAU_DEBUG"
56+
value = ""
57+
isEnabled = "YES">
58+
</EnvironmentVariable>
59+
</EnvironmentVariables>
60+
</LaunchAction>
61+
<ProfileAction
62+
buildConfiguration = "Debug"
63+
shouldUseLaunchSchemeArgsEnv = "YES"
64+
savedToolIdentifier = ""
65+
useCustomWorkingDirectory = "NO"
66+
debugDocumentVersioning = "YES">
67+
<BuildableProductRunnable
68+
runnableDebuggingMode = "0">
69+
<BuildableReference
70+
BuildableIdentifier = "primary"
71+
BlueprintIdentifier = "4B2B870D26BA88D100887DC8"
72+
BuildableName = "RideauDemo2.app"
73+
BlueprintName = "RideauDemo2"
74+
ReferencedContainer = "container:Rideau.xcodeproj">
75+
</BuildableReference>
76+
</BuildableProductRunnable>
77+
</ProfileAction>
78+
<AnalyzeAction
79+
buildConfiguration = "Debug">
80+
</AnalyzeAction>
81+
<ArchiveAction
82+
buildConfiguration = "Release"
83+
revealArchiveInOrganizer = "YES">
84+
</ArchiveAction>
85+
</Scheme>

Rideau/InternalUtils.swift

+1-9
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2222
// THE SOFTWARE.
2323

24-
#if canImport(UIKit)
2524
import UIKit
2625

2726
func _getActualContentInset(from scrollView: UIScrollView) -> UIEdgeInsets {
@@ -32,18 +31,11 @@ func _getActualContentInset(from scrollView: UIScrollView) -> UIEdgeInsets {
3231
}
3332
}
3433

35-
func debugLog(_ items: Any...) {
36-
#if DEBUG
37-
print(items)
38-
#endif
39-
}
40-
#endif
41-
4234
extension NSLayoutConstraint {
4335

4436
@discardableResult
4537
func setInternalIdentifier(_ string: String) -> NSLayoutConstraint {
46-
self.identifier = "BoxLayout." + string
38+
self.identifier = "Rideau." + string
4739
return self
4840
}
4941

Rideau/Logger.swift

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import UIKit
2+
import os.log
3+
4+
enum Log {
5+
6+
static func debug(_ log: OSLog, _ object: Any...) {
7+
if #available(iOS 12.0, *) {
8+
os_log(.debug, log: log, "%@", object.map { "\($0)" }.joined(separator: " "))
9+
}
10+
}
11+
12+
static func error(_ log: OSLog, _ object: Any...) {
13+
if #available(iOS 12.0, *) {
14+
os_log(.error, log: log, "%@", object.map { "\($0)" }.joined(separator: " "))
15+
}
16+
}
17+
18+
}
19+
20+
extension OSLog {
21+
22+
private static let isDebugEnabled: Bool = {
23+
ProcessInfo().environment["RIDEAU_DEBUG"] != nil
24+
}()
25+
26+
private static func makeLogger(category: String) -> OSLog {
27+
#if DEBUG
28+
if isDebugEnabled {
29+
return OSLog.init(subsystem: "Rideau", category: category)
30+
} else {
31+
return .disabled
32+
}
33+
#else
34+
return .disabled
35+
#endif
36+
}
37+
38+
static let handlers: OSLog = {
39+
return makeLogger(category: "🚕 handlers")
40+
}()
41+
42+
static let pan: OSLog = {
43+
return makeLogger(category: "👆pan")
44+
}()
45+
46+
static let scrollView: OSLog = {
47+
return makeLogger(category: "🎞 ScrollView")
48+
}()
49+
50+
static let animation: OSLog = {
51+
return makeLogger(category: "🕹 Animation")
52+
}()
53+
}

Rideau/RideauContainerBodyType.swift

-74
This file was deleted.

0 commit comments

Comments
 (0)