11 Commits

Author SHA1 Message Date
Drew Olbrich 484a16f16e Add visionOS to Package.swift 2023-10-07 21:29:54 -07:00
Drew Olbrich 2de1a0a7b1 Release 1.7.0 2023-08-27 09:43:17 -07:00
Drew Olbrich 37fa122058 Update Release-Steps.md for 1.7.0 2023-08-27 09:40:11 -07:00
Drew Olbrich ec24bce7d8 Use visionOS for OS version instead of xrOS 2023-08-27 09:33:48 -07:00
Drew Olbrich a4cac9cf19 Update Release-Steps.md for 1.6.7 2023-08-27 09:32:59 -07:00
Drew Olbrich f84e7ac63e Don't share build schemes so they don't show up in projects that include the framework 2023-08-27 09:29:17 -07:00
Drew Olbrich ddb0700f7a Fix visionOS compiler errors 2023-06-25 14:11:36 -07:00
Drew Olbrich 6a1a0ab039 Use shields.io badges supplied by Swift Package Index 2023-03-27 07:30:08 -07:00
Drew Olbrich a9862768c9 Release 1.6.6 2023-03-26 16:54:45 -07:00
Drew Olbrich 638bdd85f7 Disable Swift package test targets 2023-03-26 16:52:24 -07:00
Drew Olbrich 723ec56928 Make ContentView public 2023-03-26 16:23:48 -07:00
14 changed files with 63 additions and 434 deletions
@@ -1,52 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CodeTests"
BuildableName = "CodeTests"
BlueprintName = "CodeTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -1,52 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "IntrinsicContentViewKeyboardTests"
BuildableName = "IntrinsicContentViewKeyboardTests"
BlueprintName = "IntrinsicContentViewKeyboardTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -1,52 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "IntrinsicSizeTests"
BuildableName = "IntrinsicSizeTests"
BlueprintName = "IntrinsicSizeTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -1,52 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ManagerTests"
BuildableName = "ManagerTests"
BlueprintName = "ManagerTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -1,127 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ScrollingContentViewController"
BuildableName = "ScrollingContentViewController"
BlueprintName = "ScrollingContentViewController"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CodeTests"
BuildableName = "CodeTests"
BlueprintName = "CodeTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "InsetContentViewKeyboardTests"
BuildableName = "InsetContentViewKeyboardTests"
BlueprintName = "InsetContentViewKeyboardTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "IntrinsicSizeTests"
BuildableName = "IntrinsicSizeTests"
BlueprintName = "IntrinsicSizeTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "KeyboardTests"
BuildableName = "KeyboardTests"
BlueprintName = "KeyboardTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ManagerTests"
BuildableName = "ManagerTests"
BlueprintName = "ManagerTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "StoryboardTests"
BuildableName = "StoryboardTests"
BlueprintName = "StoryboardTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ScrollingContentViewController"
BuildableName = "ScrollingContentViewController"
BlueprintName = "ScrollingContentViewController"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -1,52 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "StoryboardTests"
BuildableName = "StoryboardTests"
BlueprintName = "StoryboardTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
+32 -31
View File
@@ -1,11 +1,12 @@
// swift-tools-version:5.3
// swift-tools-version:5.9
import PackageDescription
let package = Package(
name: "ScrollingContentViewController",
platforms: [
.iOS(.v12)
.iOS(.v12),
.visionOS(.v1)
],
products: [
.library(
@@ -19,35 +20,35 @@ let package = Package(
.target(
name: "ScrollingContentViewController",
dependencies: []
),
.target(
name: "Common",
dependencies: ["ScrollingContentViewController"],
path: "Tests/Common"
),
.testTarget(
name: "StoryboardTests",
dependencies: ["ScrollingContentViewController", "Common"]
),
.testTarget(
name: "CodeTests",
dependencies: ["ScrollingContentViewController", "Common"]
),
.testTarget(
name: "ManagerTests",
dependencies: ["ScrollingContentViewController", "Common"]
),
.testTarget(
name: "IntrinsicSizeTests",
dependencies: ["ScrollingContentViewController"]
),
.testTarget(
name: "KeyboardTests",
dependencies: ["ScrollingContentViewController"]
),
.testTarget(
name: "InsetContentViewKeyboardTests",
dependencies: ["ScrollingContentViewController"]
)
// .target(
// name: "Common",
// dependencies: ["ScrollingContentViewController"],
// path: "Tests/Common"
// ),
// .testTarget(
// name: "StoryboardTests",
// dependencies: ["ScrollingContentViewController", "Common"]
// ),
// .testTarget(
// name: "CodeTests",
// dependencies: ["ScrollingContentViewController", "Common"]
// ),
// .testTarget(
// name: "ManagerTests",
// dependencies: ["ScrollingContentViewController", "Common"]
// ),
// .testTarget(
// name: "IntrinsicSizeTests",
// dependencies: ["ScrollingContentViewController"]
// ),
// .testTarget(
// name: "KeyboardTests",
// dependencies: ["ScrollingContentViewController"]
// ),
// .testTarget(
// name: "InsetContentViewKeyboardTests",
// dependencies: ["ScrollingContentViewController"]
// )
]
)
+2 -2
View File
@@ -1,7 +1,7 @@
# ScrollingContentViewController
[![Platform](https://img.shields.io/badge/platform-iOS-lightgray.svg)](http://developer.apple.com/ios)
[![Swift 5](https://img.shields.io/badge/swift-5-red.svg?style=flat)](https://developer.apple.com/swift)
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fdrewolbrich%2FScrollingContentViewController%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/drewolbrich/ScrollingContentViewController)
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fdrewolbrich%2FScrollingContentViewController%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/drewolbrich/ScrollingContentViewController)
[![License](https://img.shields.io/github/license/drewolbrich/ScrollingContentViewController.svg)](LICENSE)
* [Overview](#overview)
+5 -5
View File
@@ -1,10 +1,10 @@
# Release Steps
1. Determine the new release number, like `1.6.5` and search and replace the previous version number with it in this file.
1. Determine the new release number, like `1.7.0` and search and replace the previous version number with it in this file.
2. Verify that the tests pass:
```
xcodebuild test -scheme ScrollingContentViewControllerTests -sdk iphonesimulator16.2 -destination "OS=16.2,name=iPhone 14"
xcodebuild test -scheme ScrollingContentViewControllerTests -sdk iphonesimulator16.4 -destination "OS=16.4,name=iPhone 14"
```
3. In `Sources > Info.plist`, update `Bundle version string` with the new release number.
@@ -23,13 +23,13 @@ pod lib lint
7. Commit the updated release number and Cocopods spec file:
```
git add -A && git commit -m "Release 1.6.5"
git add -A && git commit -m "Release 1.7.0"
git push
```
8. Create a tag for the new release. For consistency, **do not** prefix tags with 'v'.
```
git tag '1.6.5'
git tag '1.7.0'
git push --tags
```
@@ -46,6 +46,6 @@ pod trunk register drew@retroactivefiasco.com 'Drew Olbrich' --description='MacB
10. Draft a new release on GitHub at https://github.com/drewolbrich/ScrollingContentViewController/releases
11. For the new release, use the release number 1.6.5 as the title and prefix each item in the description with bullets, indicated by '*'.
11. For the new release, use the release number 1.7.0 as the title and prefix each item in the description with bullets, indicated by '*'.
12. Leave **Set as the latest release** checked and click **Publish**.
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'ScrollingContentViewController'
s.version = '1.6.5'
s.version = '1.7.0'
s.summary = 'A Swift library that simplifies making a view controller\'s view scrollable'
s.description = <<-DESC
+1 -1
View File
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.6.5</string>
<string>1.7.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
@@ -95,9 +95,17 @@ internal class KeyboardObserver: NSObject {
// handled. This avoids unwanted animation.
scrollViewFilter.submitKeyboardFrameEvent(keyboardFrameEvent)
let keyboardDismissModeIsDefined: Bool
#if !os(visionOS)
keyboardDismissModeIsDefined = scrollView.keyboardDismissMode != .none
#else
// keyboardDismissMode is unavailable on visionOS.
keyboardDismissModeIsDefined = false
#endif
if notification.name == UIResponder.keyboardWillHideNotification
&& delegate?.shouldResizeContentViewForKeyboard == true
&& scrollView.keyboardDismissMode != .none
&& keyboardDismissModeIsDefined
&& scrollView.isTracking {
// If the keyboard is being dismissed by way of a drag gesture and the content view
// is resizable, respond to the change in the keyboard's frame immediately, without
@@ -26,11 +26,18 @@ internal class ScrollViewBounceController {
var bottomInset: CGFloat = 0 {
didSet {
guard let scrollView = delegate?.scrollView,
scrollView.keyboardDismissMode != .none else {
guard let scrollView = delegate?.scrollView else {
return
}
#if !os(visionOS)
guard scrollView.keyboardDismissMode != .none else {
return
}
#else
// keyboardDismissMode is unavailable on visionOS.
#endif
if bottomInset != 0 && oldValue == 0 {
// The keyboard was presented.
initialAlwaysBounceVertical = scrollView.alwaysBounceVertical
+4 -4
View File
@@ -10,15 +10,15 @@
import UIKit
/// A view assigned `contentView` property in StoryboardTests.storyboard.
class ContentView: UIView {
/// A content view used by `StoryboardTests`, `CodeTests`, and `ManagerTests`.
public class ContentView: UIView {
/// A constraint that determines the view's width.
var widthConstraint: NSLayoutConstraint!
public var widthConstraint: NSLayoutConstraint!
/// A constraint that determine the view's height. This constraint's constant is
/// manipulated externally to test the behavior of views of varying heights.
var heightConstraint: NSLayoutConstraint!
public var heightConstraint: NSLayoutConstraint!
override init(frame: CGRect) {
super.init(frame: frame)