Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 851cbad148 | |||
| 665d45b421 | |||
| 93a0c79268 | |||
| a6ccd66c9b | |||
| 1dc661fb06 | |||
| c0c479cdba | |||
| d76389e430 | |||
| c7563abb4e | |||
| 68d1d645e4 | |||
| 125b276319 | |||
| bb542c0ef9 | |||
| 59ac63c3f1 | |||
| 3620387efc | |||
| e9b9dc7e0e | |||
| 5dc40100bf | |||
| 061acc97cf | |||
| 5c8a4252d3 |
@@ -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.
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
// swift-tools-version:5.3
|
||||
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "ScrollingContentViewController",
|
||||
platforms: [
|
||||
.iOS(.v12)
|
||||
],
|
||||
products: [
|
||||
// Products define the executables and libraries a package produces, and make them visible to other packages.
|
||||
.library(
|
||||
name: "ScrollingContentViewController",
|
||||
targets: ["ScrollingContentViewController"])
|
||||
],
|
||||
dependencies: [
|
||||
// Dependencies declare other packages that this package depends on.
|
||||
// .package(url: /* package url */, from: "1.0.0"),
|
||||
],
|
||||
targets: [
|
||||
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
|
||||
// Targets can depend on other targets in this package, and on products in packages this package depends on.
|
||||
.target(
|
||||
name: "ScrollingContentViewController",
|
||||
dependencies: []),
|
||||
.testTarget(
|
||||
name: "ScrollingContentViewControllerTests",
|
||||
dependencies: ["ScrollingContentViewController"])
|
||||
]
|
||||
)
|
||||
@@ -43,6 +43,8 @@ An explanation of [how ScrollingContentViewController works internally](#how-it-
|
||||
|
||||
## Installation
|
||||
|
||||
ScrollingContentViewController may be added as a Swift Package dependency in Xcode.
|
||||
|
||||
To install ScrollingContentViewController using CocoaPods, add this line to your Podfile:
|
||||
|
||||
```ruby
|
||||
@@ -417,7 +419,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.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'ScrollingContentViewController'
|
||||
s.version = '1.4.0'
|
||||
s.version = '1.6.1'
|
||||
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'
|
||||
|
||||
|
||||
@@ -203,10 +203,10 @@
|
||||
3A3652F721F390110010CE55 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; 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; };
|
||||
@@ -338,10 +338,11 @@
|
||||
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 +363,32 @@
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3A5702D021E2CBB600E4CC55 /* Source */ = {
|
||||
3A5702D021E2CBB600E4CC55 /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3A5B3CB9265D481400E26100 /* ScrollingContentViewController */,
|
||||
);
|
||||
path = Sources;
|
||||
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;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3A5B3CB9265D481400E26100 /* ScrollingContentViewController */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3AAC048E21E2D4C500D94DA5 /* ScrollingContentViewController.swift */,
|
||||
@@ -384,26 +410,8 @@
|
||||
3AAC049321E2F01C00D94DA5 /* UIResponder+Current.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 +654,7 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 1010;
|
||||
LastUpgradeCheck = 1010;
|
||||
LastUpgradeCheck = 1250;
|
||||
ORGANIZATIONNAME = "Oath Inc.";
|
||||
TargetAttributes = {
|
||||
3A5702CD21E2CBB600E4CC55 = {
|
||||
@@ -1004,6 +1012,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 +1039,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 +1077,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 +1098,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,13 +1121,14 @@
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
|
||||
INFOPLIST_FILE = "";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.6.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.retroactivefiasco.ScrollingContentViewController;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
SKIP_INSTALL = YES;
|
||||
@@ -1138,13 +1149,14 @@
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
|
||||
INFOPLIST_FILE = "";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.6.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.retroactivefiasco.ScrollingContentViewController;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
SKIP_INSTALL = YES;
|
||||
|
||||
+3
-7
@@ -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"
|
||||
|
||||
+3
-7
@@ -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"
|
||||
|
||||
+12
-16
@@ -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"
|
||||
|
||||
+3
-7
@@ -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"
|
||||
|
||||
+3
-7
@@ -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,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.4.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
</dict>
|
||||
</plist>
|
||||
+1
-1
@@ -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 }
|
||||
+1
-1
@@ -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
|
||||
+1
-1
@@ -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)
|
||||
+1
-1
@@ -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 }
|
||||
+1
-1
@@ -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 {
|
||||
+1
-1
@@ -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 }
|
||||
+1
-1
@@ -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.
|
||||
+1
-1
@@ -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)
|
||||
+2
-2
@@ -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))
|
||||
@@ -133,7 +133,7 @@ public class ScrollingContentScrollView: UIScrollView {
|
||||
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:
|
||||
+2
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user