36 Commits

Author SHA1 Message Date
Drew Olbrich 6691322781 Set version to 1.6.3 2022-10-22 15:02:47 -07:00
Drew Olbrich 8bdbc44f39 Fix Xcode 14 SwiftLint dependency analysis warning 2022-10-22 12:58:55 -07:00
Drew Olbrich 5ae5c97f00 Fix access to SwiftLint on M1 macs 2022-10-22 12:57:47 -07:00
Drew Olbrich 1108944654 Update comments 2022-05-18 18:25:37 -07:00
Drew Olbrich 365840db98 Update Travis CI link 2022-04-16 12:47:45 -07:00
Drew Olbrich 1024939b76 Set podspec version to 1.6.2 2021-07-18 10:01:34 -07:00
Drew Olbrich c43e82be23 Revert "Change Travis CI xcode_scheme to ScrollingContentViewControllerTests"
This reverts commit 33c590a228.
2021-07-18 09:55:54 -07:00
Drew Olbrich 33c590a228 Change Travis CI xcode_scheme to ScrollingContentViewControllerTests 2021-07-18 09:48:21 -07:00
Drew Olbrich f26290d678 Add ScrollingContentViewControllerTests scheme 2021-07-18 09:47:57 -07:00
Drew Olbrich 0ce377769e Move Info.plist to Sources 2021-07-18 09:34:32 -07:00
Drew Olbrich dbea32781b Fix Xcode 13 compiler errors 2021-07-18 09:16:48 -07:00
Drew Olbrich 92ebbd1a60 Reorder accessors 2021-07-17 13:56:44 -07:00
Drew Olbrich b771157496 Update SPM installation instructions 2021-06-10 07:31:45 -07:00
Drew Olbrich a253a13ffb Update SPM installation instructions 2021-06-10 07:28:16 -07:00
Drew Olbrich 4c426503c9 Restore Info.plist 2021-06-05 10:00:48 -07:00
Drew Olbrich 2993da6f9a Use iPhone 12 Pro for Travis 2021-06-05 09:42:29 -07:00
Drew Olbrich 7d0e772c3e Update Travis to Xcode 12.5, iOS 14.5 2021-06-05 09:36:57 -07:00
Drew Olbrich ad77cebc00 Switch to travis-ci.com 2021-06-05 09:30:30 -07:00
Drew Olbrich d02547e758 Remove comments 2021-06-05 09:13:09 -07:00
Drew Olbrich 851cbad148 Remove Info.plist not needed by SPM 2021-05-29 11:18:15 -07:00
Drew Olbrich 665d45b421 Fix typo 2021-05-26 11:25:12 -07:00
Drew Olbrich 93a0c79268 Update SPM installation note 2021-05-25 08:40:24 -07:00
Drew Olbrich a6ccd66c9b Reorder installation notes 2021-05-25 08:39:36 -07:00
Drew Olbrich 1dc661fb06 Add SPM installation note to README 2021-05-25 08:37:50 -07:00
Drew Olbrich c0c479cdba Fix SPM iOS platform version 2021-05-25 08:19:06 -07:00
Drew Olbrich d76389e430 Set minimum iOS version to 12 2021-05-25 08:15:43 -07:00
Drew Olbrich c7563abb4e Fix missing UIKit import 2021-05-25 08:13:09 -07:00
Drew Olbrich 68d1d645e4 Fix missing UIKit import 2021-05-25 08:10:29 -07:00
Drew Olbrich 125b276319 Rename to standard SPM Sources path 2021-05-25 07:59:17 -07:00
Drew Olbrich bb542c0ef9 Update package paths 2021-05-25 07:38:25 -07:00
Drew Olbrich 59ac63c3f1 Set podspec version to 1.6.0 2021-05-25 07:30:33 -07:00
Drew Olbrich 3620387efc Add Package.swift 2021-05-25 07:25:49 -07:00
Drew Olbrich e9b9dc7e0e Update to recommended settings 2021-05-25 07:09:18 -07:00
Drew Olbrich 5dc40100bf Fix compiler warnings 2021-05-11 06:32:10 -07:00
Drew Olbrich 061acc97cf Fix typo 2021-05-11 06:30:40 -07:00
Drew Olbrich 5c8a4252d3 Fix typo 2021-02-25 07:50:38 -08:00
50 changed files with 725 additions and 177 deletions
+1
View File
@@ -39,6 +39,7 @@ playground.xcworkspace
# Package.pins
# Package.resolved
.build/
.swiftpm/xcode/xcuserdata
# CocoaPods
#
@@ -0,0 +1,52 @@
<?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>
@@ -0,0 +1,52 @@
<?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>
@@ -0,0 +1,52 @@
<?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>
@@ -0,0 +1,52 @@
<?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>
@@ -0,0 +1,67 @@
<?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>
</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>
@@ -0,0 +1,52 @@
<?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>
+2 -2
View File
@@ -1,5 +1,5 @@
language: swift
osx_image: xcode10.2
osx_image: xcode12.5
xcode_project: ScrollingContentViewController.xcodeproj
xcode_scheme: ScrollingContentViewController
xcode_destination: platform=iOS Simulator,OS=12.1,name=iPhone X
xcode_destination: platform=iOS Simulator,OS=14.5,name=iPhone 12 Pro
@@ -11,7 +11,7 @@
import UIKit
/// Delegate for SignUpController.
protocol SignUpControllerDelegate: class {
protocol SignUpControllerDelegate: AnyObject {
/// Tells the delegate to scroll the scroll view so that the first responder becomes
/// visible.
+48
View File
@@ -0,0 +1,48 @@
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "ScrollingContentViewController",
platforms: [
.iOS(.v12)
],
products: [
.library(
name: "ScrollingContentViewController",
targets: ["ScrollingContentViewController"]
)
],
dependencies: [
],
targets: [
.target(
name: "ScrollingContentViewController",
dependencies: []
),
.testTarget(
name: "StoryboardTests",
dependencies: ["ScrollingContentViewController"]
),
.testTarget(
name: "CodeTests",
dependencies: ["ScrollingContentViewController"]
),
.testTarget(
name: "ManagerTests",
dependencies: ["ScrollingContentViewController"]
),
.testTarget(
name: "IntrinsicSizeTests",
dependencies: ["ScrollingContentViewController"]
),
.testTarget(
name: "KeyboardTests",
dependencies: ["ScrollingContentViewController"]
),
.testTarget(
name: "InsetContentViewKeyboardTests",
dependencies: ["ScrollingContentViewController"]
)
]
)
+8 -2
View File
@@ -1,6 +1,6 @@
# ScrollingContentViewController
[![Travis](https://img.shields.io/travis/drewolbrich/ScrollingContentViewController.svg)](https://travis-ci.org/drewolbrich/ScrollingContentViewController)
[![Travis](https://img.shields.io/travis/drewolbrich/ScrollingContentViewController.svg)](https://app.travis-ci.com/github/drewolbrich/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)
[![License](https://img.shields.io/github/license/drewolbrich/ScrollingContentViewController.svg)](LICENSE)
@@ -43,6 +43,12 @@ An explanation of [how ScrollingContentViewController works internally](#how-it-
## Installation
To install ScrollingContentViewController using Swift Package Manager, add this package URL to your project:
```
https://github.com/drewolbrich/ScrollingContentViewController
```
To install ScrollingContentViewController using CocoaPods, add this line to your Podfile:
```ruby
@@ -417,7 +423,7 @@ To work around this issue, ScrollingContentViewController filters out sequences
During a device orientation transition, a [`keyboardWillHide`](https://developer.apple.com/documentation/uikit/uikeyboardwillhidenotification) notification is posted before the animation starts, followed by [`keyboardWillShow`](https://developer.apple.com/documentation/uikit/uiresponder/1621576-keyboardwillshownotification) after it ends, even though the keyboard remains visible during the transition. Because the duration of the animation exceeds the filtering time window, it is therefore necessary to temporarily suspend filtering during the transition. Otherwise, the content view would resize unnecessarily.
Finally, ScrollingContentViewController correctly handles the case where changes to the size or layout of the scroll view's content may occur in response to keyboard presentation or device orientation changes (in particular when [`shouldResizeContentViewForKeyboard`](#shouldResizeContentViewForKeyboard) is `true`), invaliding the coordinate space of the rectangle passed to [`scrollRectToVisible`](https://developer.apple.com/documentation/uikit/uiscrollview/1619439-scrollrecttovisible) (most importantly, in the case when that method is called automatically by iOS after keyboard changes) which would otherwise result in the scroll view scrolling by an inappropriate amount or leaving the scroll view with a content offset that is outside of the legal scrolling range.
Finally, ScrollingContentViewController correctly handles the case where changes to the size or layout of the scroll view's content may occur in response to keyboard presentation or device orientation changes (in particular when [`shouldResizeContentViewForKeyboard`](#shouldResizeContentViewForKeyboard) is `true`), invalidating the coordinate space of the rectangle passed to [`scrollRectToVisible`](https://developer.apple.com/documentation/uikit/uiscrollview/1619439-scrollrecttovisible) (most importantly, in the case when that method is called automatically by iOS after keyboard changes) which would otherwise result in the scroll view scrolling by an inappropriate amount or leaving the scroll view with a content offset that is outside of the legal scrolling range.
Refer to Apple's [Managing the Keyboard](https://developer.apple.com/library/archive/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html#//apple_ref/doc/uid/TP40009542-CH5-SW3) documentation for more information about responding to changes in keyboard visibility.
+3 -3
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'ScrollingContentViewController'
s.version = '1.4.0'
s.version = '1.6.3'
s.summary = 'A Swift library that simplifies making a view controller\'s view scrollable'
s.description = <<-DESC
@@ -17,9 +17,9 @@ device rotations.
s.source = { :git => 'https://github.com/drewolbrich/ScrollingContentViewController.git', :tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/drewolbrich'
s.ios.deployment_target = '11.0'
s.ios.deployment_target = '12.0'
s.source_files = 'Source/**/*.swift'
s.source_files = 'Sources/**/*.swift'
s.frameworks = 'UIKit'
@@ -3,15 +3,22 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
3A06577C2200A552005BE8CC /* IsUnitTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A06577B2200A552005BE8CC /* IsUnitTest.swift */; };
3A3652F621F38E750010CE55 /* StoryboardTests.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3A3652F521F38E750010CE55 /* StoryboardTests.storyboard */; };
3A3652F821F390110010CE55 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A3652F721F390110010CE55 /* ContentView.swift */; };
3A1A174626A4839F006EE907 /* UIView+FirstResponder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1A174526A4839F006EE907 /* UIView+FirstResponder.swift */; };
3A1A176026A485BB006EE907 /* CodeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1A174B26A48489006EE907 /* CodeTests.swift */; };
3A1A176126A485C3006EE907 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1A175626A48489006EE907 /* ContentView.swift */; };
3A1A176226A485C3006EE907 /* StoryboardTests.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3A1A175426A48489006EE907 /* StoryboardTests.storyboard */; };
3A1A176326A485C3006EE907 /* IntrinsicSizeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1A174926A48489006EE907 /* IntrinsicSizeTests.swift */; };
3A1A176426A485C3006EE907 /* IntrinsicSizeContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1A174E26A48489006EE907 /* IntrinsicSizeContentView.swift */; };
3A1A176526A485C3006EE907 /* StoryboardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1A175526A48489006EE907 /* StoryboardTests.swift */; };
3A1A176626A485C3006EE907 /* KeyboardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1A175026A48489006EE907 /* KeyboardTests.swift */; };
3A1A176726A485C3006EE907 /* ManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1A175226A48489006EE907 /* ManagerTests.swift */; };
3A1A176826A485C3006EE907 /* InsetContentViewKeyboardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1A174D26A48489006EE907 /* InsetContentViewKeyboardTests.swift */; };
3A5702D821E2CBB600E4CC55 /* ScrollingContentViewController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A5702CE21E2CBB600E4CC55 /* ScrollingContentViewController.framework */; };
3A5702DD21E2CBB600E4CC55 /* StoryboardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A5702DC21E2CBB600E4CC55 /* StoryboardTests.swift */; };
3A5702DF21E2CBB600E4CC55 /* ScrollingContentViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A5702D121E2CBB600E4CC55 /* ScrollingContentViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
3A61C80721EB9028001F76A8 /* SecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A61C80621EB9028001F76A8 /* SecondViewController.swift */; };
3A61C80921EB9032001F76A8 /* ThirdViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A61C80821EB9032001F76A8 /* ThirdViewController.swift */; };
@@ -34,10 +41,8 @@
3A83273921E700A000E8D95C /* SignUpController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A83273721E700A000E8D95C /* SignUpController.swift */; };
3A83273B21E703F600E8D95C /* SignUpControllerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A83273A21E703F600E8D95C /* SignUpControllerDelegate.swift */; };
3A83273C21E703F600E8D95C /* SignUpControllerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A83273A21E703F600E8D95C /* SignUpControllerDelegate.swift */; };
3A881DB9224525F500E21CA2 /* InsetContentViewKeyboardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A881DB72245257E00E21CA2 /* InsetContentViewKeyboardTests.swift */; };
3AAC048F21E2D4C500D94DA5 /* ScrollingContentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC048E21E2D4C500D94DA5 /* ScrollingContentViewController.swift */; };
3AAC049121E2D4F100D94DA5 /* ScrollingContentViewManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC049021E2D4F100D94DA5 /* ScrollingContentViewManager.swift */; };
3AAC049821E2F01C00D94DA5 /* UIResponder+Current.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC049321E2F01C00D94DA5 /* UIResponder+Current.swift */; };
3AAC049921E2F01C00D94DA5 /* KeyboardObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC049421E2F01C00D94DA5 /* KeyboardObserver.swift */; };
3AAC049A21E2F01C00D94DA5 /* ScrollViewBounceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC049521E2F01C00D94DA5 /* ScrollViewBounceController.swift */; };
3AAC049B21E2F01C00D94DA5 /* AdditionalSafeAreaInsetsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC049621E2F01C00D94DA5 /* AdditionalSafeAreaInsetsController.swift */; };
@@ -66,11 +71,6 @@
3AAC04FC21E4534600D94DA5 /* RoundedCornersImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC04C421E3A43100D94DA5 /* RoundedCornersImage.swift */; };
3AAC04FD21E4534600D94DA5 /* GradientBackgroundView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC04C521E3A43100D94DA5 /* GradientBackgroundView.swift */; };
3AC88F5221E5B7F600EED460 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AC88F5021E5B7F600EED460 /* AppDelegate.swift */; };
3AD597C921F3964000F220A0 /* CodeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD597C821F3964000F220A0 /* CodeTests.swift */; };
3AD597CB21F3995A00F220A0 /* ManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD597CA21F3995A00F220A0 /* ManagerTests.swift */; };
3AD597CD21F3AC2000F220A0 /* IntrinsicSizeContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD597CC21F3AC2000F220A0 /* IntrinsicSizeContentView.swift */; };
3AD597CF21F3AD8000F220A0 /* IntrinsicSizeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD597CE21F3AD8000F220A0 /* IntrinsicSizeTests.swift */; };
3AD597D121F3B70400F220A0 /* KeyboardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD597D021F3B70400F220A0 /* KeyboardTests.swift */; };
3AD597D321F420ED00F220A0 /* KeyboardNotificationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD597D221F420ED00F220A0 /* KeyboardNotificationManager.swift */; };
3AD597D521F4221B00F220A0 /* KeyboardNotificationObserving.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD597D421F4221B00F220A0 /* KeyboardNotificationObserving.swift */; };
3ADD380A21EBFC6200396B7A /* KeyboardFrameEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3ADD380921EBFC6200396B7A /* KeyboardFrameEvent.swift */; };
@@ -199,14 +199,22 @@
/* Begin PBXFileReference section */
3A06577B2200A552005BE8CC /* IsUnitTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IsUnitTest.swift; sourceTree = "<group>"; };
3A3652F521F38E750010CE55 /* StoryboardTests.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = StoryboardTests.storyboard; sourceTree = "<group>"; };
3A3652F721F390110010CE55 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
3A1A174526A4839F006EE907 /* UIView+FirstResponder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+FirstResponder.swift"; sourceTree = "<group>"; };
3A1A174726A483CB006EE907 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3A1A174926A48489006EE907 /* IntrinsicSizeTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IntrinsicSizeTests.swift; sourceTree = "<group>"; };
3A1A174B26A48489006EE907 /* CodeTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CodeTests.swift; sourceTree = "<group>"; };
3A1A174D26A48489006EE907 /* InsetContentViewKeyboardTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InsetContentViewKeyboardTests.swift; sourceTree = "<group>"; };
3A1A174E26A48489006EE907 /* IntrinsicSizeContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IntrinsicSizeContentView.swift; sourceTree = "<group>"; };
3A1A175026A48489006EE907 /* KeyboardTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyboardTests.swift; sourceTree = "<group>"; };
3A1A175226A48489006EE907 /* ManagerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ManagerTests.swift; sourceTree = "<group>"; };
3A1A175426A48489006EE907 /* StoryboardTests.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = StoryboardTests.storyboard; sourceTree = "<group>"; };
3A1A175526A48489006EE907 /* StoryboardTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoryboardTests.swift; sourceTree = "<group>"; };
3A1A175626A48489006EE907 /* ContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
3A1A176A26A48701006EE907 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3A5702CE21E2CBB600E4CC55 /* ScrollingContentViewController.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ScrollingContentViewController.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3A5702D121E2CBB600E4CC55 /* ScrollingContentViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ScrollingContentViewController.h; sourceTree = "<group>"; };
3A5702D221E2CBB600E4CC55 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3A5702D721E2CBB600E4CC55 /* ScrollingContentViewControllerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ScrollingContentViewControllerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3A5702DC21E2CBB600E4CC55 /* StoryboardTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoryboardTests.swift; sourceTree = "<group>"; };
3A5702DE21E2CBB600E4CC55 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3A5B3C98265D3D2100E26100 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
3A61C80621EB9028001F76A8 /* SecondViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecondViewController.swift; sourceTree = "<group>"; };
3A61C80821EB9032001F76A8 /* ThirdViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThirdViewController.swift; sourceTree = "<group>"; };
3A6273DF21E79757008EA567 /* ManagerExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ManagerExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -216,13 +224,11 @@
3A7014BB21EBD723002C6740 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
3A83273721E700A000E8D95C /* SignUpController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignUpController.swift; sourceTree = "<group>"; };
3A83273A21E703F600E8D95C /* SignUpControllerDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignUpControllerDelegate.swift; sourceTree = "<group>"; };
3A881DB72245257E00E21CA2 /* InsetContentViewKeyboardTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InsetContentViewKeyboardTests.swift; sourceTree = "<group>"; };
3AAC048821E2D3FD00D94DA5 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
3AAC048921E2D3FD00D94DA5 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
3AAC048A21E2D3FD00D94DA5 /* ScrollingContentViewController.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; fileEncoding = 4; path = ScrollingContentViewController.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
3AAC048A21E2D3FD00D94DA5 /* ScrollingContentViewController.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; fileEncoding = 4; path = ScrollingContentViewController.podspec; sourceTree = "<group>"; };
3AAC048E21E2D4C500D94DA5 /* ScrollingContentViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScrollingContentViewController.swift; sourceTree = "<group>"; };
3AAC049021E2D4F100D94DA5 /* ScrollingContentViewManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScrollingContentViewManager.swift; sourceTree = "<group>"; };
3AAC049321E2F01C00D94DA5 /* UIResponder+Current.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIResponder+Current.swift"; sourceTree = "<group>"; };
3AAC049421E2F01C00D94DA5 /* KeyboardObserver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyboardObserver.swift; sourceTree = "<group>"; };
3AAC049521E2F01C00D94DA5 /* ScrollViewBounceController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScrollViewBounceController.swift; sourceTree = "<group>"; };
3AAC049621E2F01C00D94DA5 /* AdditionalSafeAreaInsetsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdditionalSafeAreaInsetsController.swift; sourceTree = "<group>"; };
@@ -247,11 +253,6 @@
3AC88F5021E5B7F600EED460 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
3ACE0D7B220B34BE0093FE5A /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .swiftlint.yml; sourceTree = "<group>"; };
3ACE0D7C220B34BE0093FE5A /* .travis.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .travis.yml; sourceTree = "<group>"; };
3AD597C821F3964000F220A0 /* CodeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodeTests.swift; sourceTree = "<group>"; };
3AD597CA21F3995A00F220A0 /* ManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ManagerTests.swift; sourceTree = "<group>"; };
3AD597CC21F3AC2000F220A0 /* IntrinsicSizeContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IntrinsicSizeContentView.swift; sourceTree = "<group>"; };
3AD597CE21F3AD8000F220A0 /* IntrinsicSizeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IntrinsicSizeTests.swift; sourceTree = "<group>"; };
3AD597D021F3B70400F220A0 /* KeyboardTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardTests.swift; sourceTree = "<group>"; };
3AD597D221F420ED00F220A0 /* KeyboardNotificationManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardNotificationManager.swift; sourceTree = "<group>"; };
3AD597D421F4221B00F220A0 /* KeyboardNotificationObserving.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardNotificationObserving.swift; sourceTree = "<group>"; };
3ADD380921EBFC6200396B7A /* KeyboardFrameEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardFrameEvent.swift; sourceTree = "<group>"; };
@@ -333,15 +334,67 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
3A1A174826A48489006EE907 /* IntrinsicSizeTests */ = {
isa = PBXGroup;
children = (
3A1A174926A48489006EE907 /* IntrinsicSizeTests.swift */,
);
path = IntrinsicSizeTests;
sourceTree = "<group>";
};
3A1A174A26A48489006EE907 /* CodeTests */ = {
isa = PBXGroup;
children = (
3A1A174B26A48489006EE907 /* CodeTests.swift */,
);
path = CodeTests;
sourceTree = "<group>";
};
3A1A174C26A48489006EE907 /* InsetContentViewKeyboardTests */ = {
isa = PBXGroup;
children = (
3A1A174D26A48489006EE907 /* InsetContentViewKeyboardTests.swift */,
3A1A174E26A48489006EE907 /* IntrinsicSizeContentView.swift */,
);
path = InsetContentViewKeyboardTests;
sourceTree = "<group>";
};
3A1A174F26A48489006EE907 /* KeyboardTests */ = {
isa = PBXGroup;
children = (
3A1A175026A48489006EE907 /* KeyboardTests.swift */,
);
path = KeyboardTests;
sourceTree = "<group>";
};
3A1A175126A48489006EE907 /* ManagerTests */ = {
isa = PBXGroup;
children = (
3A1A175226A48489006EE907 /* ManagerTests.swift */,
);
path = ManagerTests;
sourceTree = "<group>";
};
3A1A175326A48489006EE907 /* StoryboardTests */ = {
isa = PBXGroup;
children = (
3A1A175426A48489006EE907 /* StoryboardTests.storyboard */,
3A1A175526A48489006EE907 /* StoryboardTests.swift */,
3A1A175626A48489006EE907 /* ContentView.swift */,
);
path = StoryboardTests;
sourceTree = "<group>";
};
3A5702C421E2CBB600E4CC55 = {
isa = PBXGroup;
children = (
3AAC048921E2D3FD00D94DA5 /* LICENSE */,
3AAC048821E2D3FD00D94DA5 /* README.md */,
3A5B3C98265D3D2100E26100 /* Package.swift */,
3AAC048A21E2D3FD00D94DA5 /* ScrollingContentViewController.podspec */,
3ACE0D7B220B34BE0093FE5A /* .swiftlint.yml */,
3ACE0D7C220B34BE0093FE5A /* .travis.yml */,
3A5702D021E2CBB600E4CC55 /* Source */,
3A5702D021E2CBB600E4CC55 /* Sources */,
3AAC04A521E39FBF00D94DA5 /* Examples */,
3A5702DB21E2CBB600E4CC55 /* Tests */,
3A5702CF21E2CBB600E4CC55 /* Products */,
@@ -362,7 +415,30 @@
name = Products;
sourceTree = "<group>";
};
3A5702D021E2CBB600E4CC55 /* Source */ = {
3A5702D021E2CBB600E4CC55 /* Sources */ = {
isa = PBXGroup;
children = (
3A1A174726A483CB006EE907 /* Info.plist */,
3A5B3CB9265D481400E26100 /* ScrollingContentViewController */,
);
path = Sources;
sourceTree = "<group>";
};
3A5702DB21E2CBB600E4CC55 /* Tests */ = {
isa = PBXGroup;
children = (
3A1A176A26A48701006EE907 /* Info.plist */,
3A1A174A26A48489006EE907 /* CodeTests */,
3A1A174C26A48489006EE907 /* InsetContentViewKeyboardTests */,
3A1A174826A48489006EE907 /* IntrinsicSizeTests */,
3A1A174F26A48489006EE907 /* KeyboardTests */,
3A1A175126A48489006EE907 /* ManagerTests */,
3A1A175326A48489006EE907 /* StoryboardTests */,
);
path = Tests;
sourceTree = "<group>";
};
3A5B3CB9265D481400E26100 /* ScrollingContentViewController */ = {
isa = PBXGroup;
children = (
3AAC048E21E2D4C500D94DA5 /* ScrollingContentViewController.swift */,
@@ -381,29 +457,11 @@
3AAC049F21E2F28A00D94DA5 /* ScrollViewBounceControlling.swift */,
3AAC049621E2F01C00D94DA5 /* AdditionalSafeAreaInsetsController.swift */,
3AAC049D21E2F18E00D94DA5 /* AdditionalSafeAreaInsetsControlling.swift */,
3AAC049321E2F01C00D94DA5 /* UIResponder+Current.swift */,
3A1A174526A4839F006EE907 /* UIView+FirstResponder.swift */,
3A06577B2200A552005BE8CC /* IsUnitTest.swift */,
3A5702D121E2CBB600E4CC55 /* ScrollingContentViewController.h */,
3A5702D221E2CBB600E4CC55 /* Info.plist */,
);
path = Source;
sourceTree = "<group>";
};
3A5702DB21E2CBB600E4CC55 /* Tests */ = {
isa = PBXGroup;
children = (
3A5702DC21E2CBB600E4CC55 /* StoryboardTests.swift */,
3AD597C821F3964000F220A0 /* CodeTests.swift */,
3AD597CA21F3995A00F220A0 /* ManagerTests.swift */,
3AD597CE21F3AD8000F220A0 /* IntrinsicSizeTests.swift */,
3AD597D021F3B70400F220A0 /* KeyboardTests.swift */,
3A881DB72245257E00E21CA2 /* InsetContentViewKeyboardTests.swift */,
3A3652F521F38E750010CE55 /* StoryboardTests.storyboard */,
3A3652F721F390110010CE55 /* ContentView.swift */,
3AD597CC21F3AC2000F220A0 /* IntrinsicSizeContentView.swift */,
3A5702DE21E2CBB600E4CC55 /* Info.plist */,
);
path = Tests;
path = ScrollingContentViewController;
sourceTree = "<group>";
};
3A6273E021E79757008EA567 /* ManagerExample */ = {
@@ -646,7 +704,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1010;
LastUpgradeCheck = 1010;
LastUpgradeCheck = 1250;
ORGANIZATIONNAME = "Oath Inc.";
TargetAttributes = {
3A5702CD21E2CBB600E4CC55 = {
@@ -715,7 +773,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3A3652F621F38E750010CE55 /* StoryboardTests.storyboard in Resources */,
3A1A176226A485C3006EE907 /* StoryboardTests.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -773,6 +831,7 @@
/* Begin PBXShellScriptBuildPhase section */
3ACE0D7A220B2D790093FE5A /* Run SwiftLint */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
@@ -787,7 +846,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
shellScript = "# If we don't do this, then SwiftLint won't be found on M1 macs,\n# because it's installed in /opt/homebrew/bin instead of /usr/local/bin\n# on that platform \nif test -d \"/opt/homebrew/bin/\"; then\n PATH=\"/opt/homebrew/bin/:${PATH}\"\nfi\nexport PATH\n\nif which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
};
/* End PBXShellScriptBuildPhase section */
@@ -796,7 +855,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3AAC049821E2F01C00D94DA5 /* UIResponder+Current.swift in Sources */,
3ADD380A21EBFC6200396B7A /* KeyboardFrameEvent.swift in Sources */,
3AF3AA3721FACCAF008AF677 /* ScrollViewFilter.swift in Sources */,
3AAC04A421E301C400D94DA5 /* ScrollViewFilterKeyboardDelegate.swift in Sources */,
@@ -805,6 +863,7 @@
3AAC049921E2F01C00D94DA5 /* KeyboardObserver.swift in Sources */,
3AF3AA3921FACCCC008AF677 /* ScrollViewFilterScrollDelegate.swift in Sources */,
3AAC049B21E2F01C00D94DA5 /* AdditionalSafeAreaInsetsController.swift in Sources */,
3A1A174626A4839F006EE907 /* UIView+FirstResponder.swift in Sources */,
3AAC04A021E2F28A00D94DA5 /* ScrollViewBounceControlling.swift in Sources */,
3AAC049E21E2F18E00D94DA5 /* AdditionalSafeAreaInsetsControlling.swift in Sources */,
3AD597D521F4221B00F220A0 /* KeyboardNotificationObserving.swift in Sources */,
@@ -821,14 +880,14 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3A3652F821F390110010CE55 /* ContentView.swift in Sources */,
3A5702DD21E2CBB600E4CC55 /* StoryboardTests.swift in Sources */,
3AD597CF21F3AD8000F220A0 /* IntrinsicSizeTests.swift in Sources */,
3A881DB9224525F500E21CA2 /* InsetContentViewKeyboardTests.swift in Sources */,
3AD597D121F3B70400F220A0 /* KeyboardTests.swift in Sources */,
3AD597C921F3964000F220A0 /* CodeTests.swift in Sources */,
3AD597CD21F3AC2000F220A0 /* IntrinsicSizeContentView.swift in Sources */,
3AD597CB21F3995A00F220A0 /* ManagerTests.swift in Sources */,
3A1A176726A485C3006EE907 /* ManagerTests.swift in Sources */,
3A1A176126A485C3006EE907 /* ContentView.swift in Sources */,
3A1A176526A485C3006EE907 /* StoryboardTests.swift in Sources */,
3A1A176826A485C3006EE907 /* InsetContentViewKeyboardTests.swift in Sources */,
3A1A176626A485C3006EE907 /* KeyboardTests.swift in Sources */,
3A1A176426A485C3006EE907 /* IntrinsicSizeContentView.swift in Sources */,
3A1A176026A485BB006EE907 /* CodeTests.swift in Sources */,
3A1A176326A485C3006EE907 /* IntrinsicSizeTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1004,6 +1063,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -1030,7 +1090,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
@@ -1068,6 +1128,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -1088,7 +1149,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
@@ -1111,7 +1172,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@@ -1138,7 +1199,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -27,8 +27,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
@@ -38,8 +36,8 @@
ReferencedContainer = "container:ScrollingContentViewController.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@@ -61,8 +59,6 @@
ReferencedContainer = "container:ScrollingContentViewController.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -27,8 +27,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
@@ -38,8 +36,8 @@
ReferencedContainer = "container:ScrollingContentViewController.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@@ -61,8 +59,6 @@
ReferencedContainer = "container:ScrollingContentViewController.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3AE989822206443B006254A4"
BuildableName = "ReassignExample.app"
BlueprintName = "ReassignExample"
ReferencedContainer = "container:ScrollingContentViewController.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</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">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3AE989822206443B006254A4"
BuildableName = "ReassignExample.app"
BlueprintName = "ReassignExample"
ReferencedContainer = "container:ScrollingContentViewController.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3AE989822206443B006254A4"
BuildableName = "ReassignExample.app"
BlueprintName = "ReassignExample"
ReferencedContainer = "container:ScrollingContentViewController.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -26,8 +26,17 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
codeCoverageEnabled = "YES"
shouldUseLaunchSchemeArgsEnv = "YES">
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3A5702CD21E2CBB600E4CC55"
BuildableName = "ScrollingContentViewController.framework"
BlueprintName = "ScrollingContentViewController"
ReferencedContainer = "container:ScrollingContentViewController.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
@@ -40,17 +49,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3A5702CD21E2CBB600E4CC55"
BuildableName = "ScrollingContentViewController.framework"
BlueprintName = "ScrollingContentViewController"
ReferencedContainer = "container:ScrollingContentViewController.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@@ -71,8 +69,6 @@
ReferencedContainer = "container:ScrollingContentViewController.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
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 = "3A5702D621E2CBB600E4CC55"
BuildableName = "ScrollingContentViewControllerTests.xctest"
BlueprintName = "ScrollingContentViewControllerTests"
ReferencedContainer = "container:ScrollingContentViewController.xcodeproj">
</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,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -27,8 +27,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
@@ -38,8 +36,8 @@
ReferencedContainer = "container:ScrollingContentViewController.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@@ -61,8 +59,6 @@
ReferencedContainer = "container:ScrollingContentViewController.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -27,8 +27,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
@@ -38,8 +36,8 @@
ReferencedContainer = "container:ScrollingContentViewController.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@@ -61,8 +59,6 @@
ReferencedContainer = "container:ScrollingContentViewController.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
-35
View File
@@ -1,35 +0,0 @@
//
// UIResponder+Current.swift
// ScrollingContentViewController
//
// Created by Drew Olbrich on 12/29/18.
// Copyright 2019 Oath Inc.
//
// Licensed under the terms of the MIT License. See the file LICENSE for the full terms.
//
// Based on the Stack Overflow answer https://stackoverflow.com/a/52823735/2419404
// by MarqueIV https://stackoverflow.com/users/168179/marqueiv
// Licensed under the terms of the Attribution-ShareAlike 3.0 Unported license
// https://creativecommons.org/licenses/by-sa/3.0/
//
import UIKit
private var foundFirstResponder: UIResponder?
internal extension UIResponder {
/// The current first responder.
static var rf_current: UIResponder? {
UIApplication.shared.sendAction(#selector(UIResponder.storeFirstResponder(_:)), to: nil, from: nil, for: nil)
defer {
foundFirstResponder = nil
}
return foundFirstResponder
}
@objc private func storeFirstResponder(_ sender: AnyObject) {
foundFirstResponder = self
}
}
+1 -1
View File
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.4.0</string>
<string>1.6.3</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
@@ -11,7 +11,7 @@
import UIKit
/// Delegate for `AdditionalSafeAreaInsetsController`.
internal protocol AdditionalSafeAreaInsetsControlling: class {
internal protocol AdditionalSafeAreaInsetsControlling: AnyObject {
/// The view controller whose `additionalSafeAreaInsets` property is manipulated.
var hostViewController: UIViewController? { get }
@@ -8,7 +8,7 @@
// Licensed under the terms of the MIT License. See the file LICENSE for the full terms.
//
import Foundation
import UIKit
/// An event encapsulating both the keyboard's frame and the duration of the
/// animation accompanying the change in the keyboard's frame, as reported by the
@@ -12,7 +12,7 @@ import Foundation
/// A protocol for objects that should be notified by `KeyboardNotificationManager`
/// when keyboard show or hide notifications are received.
internal protocol KeyboardNotificationObserving: class {
internal protocol KeyboardNotificationObserving: AnyObject {
/// Tells the observer that a keyboard notification has been received.
func didReceiveKeyboardNotification(_ notification: Notification)
@@ -20,10 +20,10 @@ internal class KeyboardObserver: NSObject {
// See https://developer.apple.com/library/archive/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html#//apple_ref/doc/uid/TP40009542-CH5-SW3
private weak var delegate: KeyboardObserving?
private weak var scrollViewFilter: ScrollViewFilter?
private weak var delegate: KeyboardObserving?
/// The duration of the animation of the change to the container view's bottom inset.
private let bottomInsetAnimationDuration: TimeInterval = 0.5
@@ -183,7 +183,8 @@ internal class KeyboardObserver: NSObject {
guard let userInfo = notification.userInfo,
let keyboardFrameEndUserInfoValue = userInfo[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue,
let keyboardAnimationDurationNumber = userInfo[UIResponder.keyboardAnimationDurationUserInfoKey] as? NSNumber,
let window = UIApplication.shared.keyWindow
let hostViewController = delegate?.hostViewController,
let window = hostViewController.view.window
else {
return nil
}
@@ -276,9 +277,7 @@ extension KeyboardObserver: ScrollViewFilterKeyboardDelegate {
guard let keyboardFrame = keyboardFrame,
let hostViewController = delegate?.hostViewController,
let rootView = hostViewController.view,
// UIApplication.shared.keyWindow is nil when unit tests are executing, and
// rootView is nil outside of unit tests in the case when a view is being pushed.
let window = isUnitTest ? rootView.window : UIApplication.shared.keyWindow else {
let window = rootView.window else {
return nil
}
@@ -11,7 +11,7 @@
import UIKit
/// Delegate for `KeyboardObserver`.
internal protocol KeyboardObserving: class {
internal protocol KeyboardObserving: AnyObject {
/// View controller over top of which the keyboard is presented.
var hostViewController: UIViewController? { get }
@@ -8,7 +8,7 @@
// Licensed under the terms of the MIT License. See the file LICENSE for the full terms.
//
import Foundation
import UIKit
/// An event encapsulating a deferred call to `scrollRectToVisible(_:animated:)`.
internal struct ScrollRectEvent {
@@ -11,7 +11,7 @@
import UIKit
/// Delegate for `ScrollViewBounceController`.
internal protocol ScrollViewBounceControlling: class {
internal protocol ScrollViewBounceControlling: AnyObject {
/// Scroll view whose `alwaysBounceVertical` property is manipulated.
var scrollView: ScrollingContentScrollView { get }
@@ -12,7 +12,7 @@ import UIKit
/// A protocol that an object implements to be notified by `ScrollViewFilter` about
/// keyboard frame changes.
internal protocol ScrollViewFilterKeyboardDelegate: class {
internal protocol ScrollViewFilterKeyboardDelegate: AnyObject {
/// Adjusts the view to compensate for the portion of the keyboard that overlaps the
/// scroll view.
@@ -13,7 +13,7 @@ import UIKit
/// A protocol that an object implements to be notified by `ScrollViewFilter` about
/// requests to scroll a specific area of the content so that it is visible in the
/// scroll view.
internal protocol ScrollViewFilterScrollDelegate: class {
internal protocol ScrollViewFilterScrollDelegate: AnyObject {
/// Scrolls a specific area of the content so that it is visible in the scroll view.
func scrollViewFilter(_ scrollViewFilter: ScrollViewFilter, adjustViewForScrollRectEvent scrollRectEvent: ScrollRectEvent)
@@ -87,7 +87,7 @@ public class ScrollingContentScrollView: UIScrollView {
// between the time when self.scrollRectToVisible and super.scrollRectToVisible are
// called.
// Note: This does not handle the case where the rect is smaller than the
// descendant view's bounds and the size of the descedant view changes.
// descendant view's bounds and the size of the descendant view changes.
let boundsRect = descendantView.convert(rect, from: self)
let rect: CGRect? = boundsRect == descendantView.bounds ? nil : boundsRect
scrollViewFilter?.submitScrollRectEvent(ScrollRectEvent(contentArea: .descendantViewRect(rect, descendantView: descendantView), animated: animated, margin: margin ?? visibilityScrollMargin))
@@ -111,7 +111,7 @@ public class ScrollingContentScrollView: UIScrollView {
/// - view: The view to make visible.
/// - animated: If `true`, the scrolling is animated.
/// - margin: An optional margin to apply to the view. If left unspecified,
/// `scrollToVisibleMargin` is used.
/// `visibilityScrollMargin` is used.
public func scrollViewToVisible(_ view: UIView, animated: Bool, margin: CGFloat? = nil) {
scrollViewFilter?.submitScrollRectEvent(ScrollRectEvent(contentArea: .descendantViewRect(view.bounds, descendantView: view), animated: animated, margin: margin ?? visibilityScrollMargin))
@@ -124,16 +124,16 @@ public class ScrollingContentScrollView: UIScrollView {
/// - Parameters:
/// - animated: If `true`, the scrolling is animated.
/// - margin: An optional margin to apply to the first responder. If left
/// unspecified, `scrollToVisibleMargin` is used.
/// unspecified, `visibilityScrollMargin` is used.
public func scrollFirstResponderToVisible(animated: Bool, margin: CGFloat? = nil) {
guard let view = UIResponder.rf_current as? UIView else {
guard let view = self.firstResponder as? UIView else {
return
}
scrollViewToVisible(view, animated: animated, margin: margin)
}
/// Returns the descedant view with the greatest depth whose bounds contains the
/// Returns the descendant view with the greatest depth whose bounds contains the
/// specified rectangle.
///
/// - Parameters:
@@ -58,12 +58,12 @@ open class ScrollingContentViewController: UIViewController {
///
/// The default value is `false`.
@IBInspectable public var shouldResizeContentViewForKeyboard: Bool {
set {
scrollingContentViewManager.shouldResizeContentViewForKeyboard = newValue
}
get {
return scrollingContentViewManager.shouldResizeContentViewForKeyboard
}
set {
scrollingContentViewManager.shouldResizeContentViewForKeyboard = newValue
}
}
/// If `true`, the view controller's `additionalSafeAreaInsets` property is adjusted
@@ -71,12 +71,12 @@ open class ScrollingContentViewController: UIViewController {
///
/// The default value is `true`.
@IBInspectable public var shouldAdjustAdditionalSafeAreaInsetsForKeyboard: Bool {
set {
scrollingContentViewManager.shouldAdjustAdditionalSafeAreaInsetsForKeyboard = newValue
}
get {
return scrollingContentViewManager.shouldAdjustAdditionalSafeAreaInsetsForKeyboard
}
set {
scrollingContentViewManager.shouldAdjustAdditionalSafeAreaInsetsForKeyboard = newValue
}
}
/// An object that manages adding a content view to a scroll view.
@@ -455,7 +455,7 @@ public class ScrollingContentViewManager: KeyboardObserving, ScrollViewBounceCon
return
}
// The relation greaterThanOrEqualTo is used for the minimumum width and height
// The relation greaterThanOrEqualTo is used for the minimum width and height
// constraints so the content view is free to stretch to fill the scroll view's
// safe area.
@@ -482,7 +482,7 @@ public class ScrollingContentViewManager: KeyboardObserving, ScrollViewBounceCon
contentViewMinimumWidthConstraint,
contentViewMinimumHeightConstraint,
contentViewMinimumHeightForPresentedKeyboardConstraint
]
]
NSLayoutConstraint.activate(constraints)
@@ -0,0 +1,31 @@
//
// UIView+FirstResponder.swift
// ScrollingContentViewController
//
// Created by Drew Olbrich on 12/29/18.
// Copyright 2019 Oath Inc.
//
// Licensed under the terms of the MIT License. See the file LICENSE for the full terms.
//
import UIKit
internal extension UIView {
/// The first responder within a view hierarchy.
var firstResponder: UIResponder? {
let responder = self as UIResponder
if responder.isFirstResponder {
return responder
}
for subview in subviews {
if let firstResponder = subview.firstResponder {
return firstResponder
}
}
return nil
}
}