Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 851cbad148 | |||
| 665d45b421 | |||
| 93a0c79268 | |||
| a6ccd66c9b | |||
| 1dc661fb06 | |||
| c0c479cdba | |||
| d76389e430 | |||
| c7563abb4e | |||
| 68d1d645e4 | |||
| 125b276319 | |||
| bb542c0ef9 | |||
| 59ac63c3f1 | |||
| 3620387efc | |||
| e9b9dc7e0e | |||
| 5dc40100bf | |||
| 061acc97cf | |||
| 5c8a4252d3 | |||
| e6ef615083 | |||
| 8275176f21 | |||
| 4e028ee4e9 | |||
| e925415429 | |||
| 36a19cba83 | |||
| 17da6c00e4 | |||
| 46880f6631 | |||
| 9809badff2 | |||
| 5a08bff7a5 | |||
| 6d50f761ad | |||
| b4c2d666cf | |||
| 82a0d85308 |
+1
-1
@@ -1,5 +1,5 @@
|
||||
language: swift
|
||||
osx_image: xcode10.1
|
||||
osx_image: xcode10.2
|
||||
xcode_project: ScrollingContentViewController.xcodeproj
|
||||
xcode_scheme: ScrollingContentViewController
|
||||
xcode_destination: platform=iOS Simulator,OS=12.1,name=iPhone X
|
||||
|
||||
@@ -41,5 +41,7 @@
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIUserInterfaceStyle</key>
|
||||
<string>Light</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -43,5 +43,7 @@
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIUserInterfaceStyle</key>
|
||||
<string>Light</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -41,5 +41,7 @@
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIUserInterfaceStyle</key>
|
||||
<string>Light</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -41,5 +41,7 @@
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIUserInterfaceStyle</key>
|
||||
<string>Light</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -43,5 +43,7 @@
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIUserInterfaceStyle</key>
|
||||
<string>Light</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -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"])
|
||||
]
|
||||
)
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[](https://travis-ci.org/drewolbrich/ScrollingContentViewController)
|
||||
[](http://developer.apple.com/ios)
|
||||
[](https://developer.apple.com/swift)
|
||||
[](https://developer.apple.com/swift)
|
||||
[](LICENSE)
|
||||
[](http://twitter.com/drewolbrich)
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
|
||||
## Overview
|
||||
|
||||
ScrollingContentViewController makes it easy to create a view controller with a single scrolling content view, or to convert an existing static view controller into one that scrolls. Most importantly, it takes care of several tricky undocumented edge cases involving the keyboard, navigation controllers, and device rotations.
|
||||
ScrollingContentViewController makes it easy to create a view controller with a single scrolling content view, or to convert an existing static view controller into one that scrolls. Most importantly, it takes care of several tricky undocumented edge cases involving the keyboard, navigation controllers, and device rotations.
|
||||
|
||||
## Background
|
||||
|
||||
A common UIKit Auto Layout task involves creating a view controller with a fixed layout that is too large to fit older, smaller devices, or devices in landscape orientation, or the area of the screen that remains visible when the keyboard is presented. The problem is compounded when [Dynamic Type](https://developer.apple.com/documentation/uikit/uifont/scaling_fonts_automatically) is used to support large font sizes.
|
||||
A common UIKit Auto Layout task involves creating a view controller with a fixed layout that is too large to fit older, smaller devices, or devices in landscape orientation, or the area of the screen that remains visible when the keyboard is presented. The problem is compounded when [Dynamic Type](https://developer.apple.com/documentation/uikit/uifont/scaling_fonts_automatically) is used to support large font sizes.
|
||||
|
||||
For example, consider this sign up screen, which fits iPhone Xs, but not iPhone SE with a keyboard:
|
||||
|
||||
@@ -33,9 +33,9 @@ For example, consider this sign up screen, which fits iPhone Xs, but not iPhone
|
||||
|
||||
This case can be handled by nesting the view inside a scroll view. You could do this manually in Interface Builder, as described by Apple's [Working with Scroll Views](https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/WorkingwithScrollViews.html) documentation, but many steps are required. If your view contains text fields, you'll have to write code to adjust the view to compensate for the presented keyboard, as described in [Managing the Keyboard](https://developer.apple.com/library/archive/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html#//apple_ref/doc/uid/TP40009542-CH5-SW3). However, handling the keyboard robustly is [surprisingly complicated](#keyboard-resize-filtering), especially if your app presents a sequence of screens with keyboards in the context of a navigation controller, or when device orientation support is required.
|
||||
|
||||
To simplify this task, ScrollingContentViewController inserts the scroll view into the view hierarchy for you at run time, along with all necessary Auto Layout constraints.
|
||||
To simplify this task, ScrollingContentViewController inserts the scroll view into the view hierarchy for you at run time, along with all necessary Auto Layout constraints.
|
||||
|
||||
When used in a storyboard, ScrollingContentViewController exposes an outlet called [`contentView`](#contentView) that you connect to the view that you'd like to make scrollable. This may be the view controller's root view. Everything else is taken care of automatically, including responding to keyboard presentation and device orientation changes.
|
||||
When used in a storyboard, ScrollingContentViewController exposes an outlet called [`contentView`](#contentView) that you connect to the view that you'd like to make scrollable. This may be the view controller's root view or an arbitrary subview. Everything else is taken care of automatically, including responding to keyboard presentation and device orientation changes.
|
||||
|
||||
ScrollingContentViewController can be configured using storyboards or entirely in code. The easiest way to use it is by subclassing the `ScrollingContentViewController` class instead of [`UIViewController`](https://developer.apple.com/documentation/uikit/uiviewcontroller). However, when this is not an option, a helper class called `ScrollingContentViewManager` can be composed with your existing view controller class instead.
|
||||
|
||||
@@ -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
|
||||
@@ -57,7 +59,7 @@ github "drewolbrich/ScrollingContentViewController"
|
||||
|
||||
## Usage
|
||||
|
||||
Subclasses of `ScrollingContentViewController` may be configured using [storyboards](#storyboards) or in [code](#code).
|
||||
Subclasses of `ScrollingContentViewController` may be configured using [storyboards](#storyboards) or in [code](#code).
|
||||
|
||||
This library may also be used without subclassing, by composing the helper class `ScrollingContentViewManager` instead. Refer to [Usage Without Subclassing](#usage-without-subclassing).
|
||||
|
||||
@@ -71,9 +73,9 @@ To configure `ScrollingContentViewController` in a storyboard:
|
||||
import ScrollingContentViewController
|
||||
|
||||
class MyViewController: ScrollingContentViewController {
|
||||
|
||||
|
||||
// ...
|
||||
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
@@ -86,7 +88,7 @@ To configure `ScrollingContentViewController` in a storyboard:
|
||||
```swift
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
|
||||
// ...
|
||||
}
|
||||
```
|
||||
@@ -105,25 +107,25 @@ To integrate `ScrollingContentViewController` programmatically:
|
||||
import ScrollingContentViewController
|
||||
|
||||
class MyViewController: ScrollingContentViewController {
|
||||
|
||||
|
||||
// ...
|
||||
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
2. In your view controller's [`viewDidLoad`](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621495-viewdidload) method, assign a new view to the [`contentView`](#contentView) property. Add all of your controls to this view instead of referencing the [`view`](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621460-view) property so they can scroll freely. The view controller's root view referenced by its [`view`](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621460-view) property now acts as a background view behind the scrolling content view.
|
||||
2. In your view controller's [`viewDidLoad`](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621495-viewdidload) method, assign a new view to the [`contentView`](#contentView) property. Add all of your controls to this view instead of referencing the [`view`](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621460-view) property so they can scroll freely. The view controller's root view referenced by its [`view`](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621460-view) property now acts as a background view behind the scrolling content view.
|
||||
|
||||
```swift
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
contentView = UIView()
|
||||
|
||||
|
||||
// Add all controls to contentView instead of view.
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
You may also assign [`contentView`](#contentView) to a subview of your view controller's root view, in which case only that subview will be made scrollable.
|
||||
|
||||
## Caveats
|
||||
@@ -174,7 +176,7 @@ If you make changes to your content view that modify its size, you must call the
|
||||
For example, after updating the view's [`NSLayoutConstraint.constant`](https://developer.apple.com/documentation/uikit/nslayoutconstraint/1526928-constant) properties, you may animate the changes like this:
|
||||
|
||||
```swift
|
||||
UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 0,
|
||||
UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 0,
|
||||
options: [], animations: {
|
||||
self.scrollView.setNeedsLayout()
|
||||
self.scrollView.layoutIfNeeded()
|
||||
@@ -248,7 +250,7 @@ class MyViewController: UIViewController {
|
||||
}
|
||||
```
|
||||
|
||||
The `ScrollingContentViewManager` class supports all of the same [properties](#properties) and [methods](#methods) as `ScrollingContentViewController`.
|
||||
The `ScrollingContentViewManager` class supports all of the same [properties](#view-controller-properties) and [methods](#scroll-view-properties-and-methods) as `ScrollingContentViewController`.
|
||||
|
||||
`ScrollingContentViewManager` can also be used to create a scrolling view controller programatically:
|
||||
|
||||
@@ -263,7 +265,7 @@ class MyViewController: UIViewController {
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
|
||||
// Populate your content view here.
|
||||
// ...
|
||||
|
||||
@@ -309,7 +311,7 @@ class MyViewController: UIViewController {
|
||||
|
||||
* [ManagerExample](Examples/ManagerExample) - Example using `ScrollingContentViewManager` and class composition instead of subclassing `ScrollingContentViewController`.
|
||||
|
||||
* [SequenceExample](Examples/SequenceExample) - Example of a sequence of pushed scrolling view controllers with keyboards in the context of a navigation controller.
|
||||
* [SequenceExample](Examples/SequenceExample) - Example of a sequence of pushed scrolling view controllers with keyboards in the context of a navigation controller.
|
||||
|
||||
* [ReassignExample](Examples/ReassignExample) - Example of dynamically reassigning `contentView`.
|
||||
|
||||
@@ -319,7 +321,7 @@ The `ScrollingContentViewController` and `ScrollingContentViewManager` classes s
|
||||
|
||||
### contentView
|
||||
|
||||
The scrolling content view parented to the scroll view.
|
||||
The scrolling content view parented to the scroll view.
|
||||
|
||||
When this property is first assigned, the view that it references is parented to [`scrollView`](#scrollView), which is then added to the view controller's view hierarchy.
|
||||
|
||||
@@ -327,7 +329,7 @@ If the content view already has a superview, the scroll view replaces it in the
|
||||
|
||||
If the content view has no superview, the scroll view is parented to the view controller's root view and its frame and autoresizing mask are defined to track the root view's bounds.
|
||||
|
||||
If the [`contentView`](#contentView) property is later reassigned, the new content view replaces the old one as the subview of the scroll view, and the scroll view is left otherwise unmodified.
|
||||
If the [`contentView`](#contentView) property is later reassigned, the new content view replaces the old one as the subview of the scroll view, and the scroll view is left otherwise unmodified.
|
||||
|
||||
### scrollView
|
||||
|
||||
@@ -391,7 +393,7 @@ When the content view is first assigned, if it has a superview, the scroll view
|
||||
|
||||
If the content view has no superview, the scroll view is parented to the view controller's root view and its frame and autoresizing mask are defined to track the root view's bounds.
|
||||
|
||||
If the ScrollingContentViewController's `contentView` property references its root view, a new `UIView` is allocated and replaces it as the root view so that the scroll view will have an appropriate view to be parented to.
|
||||
If the ScrollingContentViewController's `contentView` property references its root view, a new `UIView` is allocated and replaces it as the root view so that the scroll view will have an appropriate view to be parented to.
|
||||
|
||||
The content view's superview does not necessarily have to be the view controller's root view, and does not have to match the root view's size.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -427,7 +429,7 @@ In addition to [keyboard resize filtering](#keyboard-resize-filtering), above, S
|
||||
|
||||
### Navigation Controllers
|
||||
|
||||
ScrollingContentViewController correctly handles sequences of pushed view controllers in the context of a navigation controller, in particular in the case when each view controller calls a text field's [`becomeFirstResponder`](https://developer.apple.com/documentation/uikit/uiresponder/1621113-becomefirstresponder) method in [`viewWillAppear`](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621510-viewwillappear), such that the keyboard remains visible across view controller transitions.
|
||||
ScrollingContentViewController correctly handles sequences of pushed view controllers in the context of a navigation controller, in particular in the case when each view controller calls a text field's [`becomeFirstResponder`](https://developer.apple.com/documentation/uikit/uiresponder/1621113-becomefirstresponder) method in [`viewWillAppear`](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621510-viewwillappear), such that the keyboard remains visible across view controller transitions.
|
||||
|
||||
### Device Orientation Changes
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'ScrollingContentViewController'
|
||||
s.version = '1.2.0'
|
||||
s.version = '1.6.1'
|
||||
s.summary = 'A Swift library that simplifies making a view controller\'s view scrollable'
|
||||
|
||||
s.description = <<-DESC
|
||||
@@ -17,11 +17,11 @@ 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'
|
||||
|
||||
s.swift_version = '4.2'
|
||||
s.swift_versions = ['4.2', '5.0']
|
||||
end
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
3AAC049B21E2F01C00D94DA5 /* AdditionalSafeAreaInsetsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC049621E2F01C00D94DA5 /* AdditionalSafeAreaInsetsController.swift */; };
|
||||
3AAC049E21E2F18E00D94DA5 /* AdditionalSafeAreaInsetsControlling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC049D21E2F18E00D94DA5 /* AdditionalSafeAreaInsetsControlling.swift */; };
|
||||
3AAC04A021E2F28A00D94DA5 /* ScrollViewBounceControlling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC049F21E2F28A00D94DA5 /* ScrollViewBounceControlling.swift */; };
|
||||
3AAC04A221E2F30700D94DA5 /* KeyboardObservering.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC04A121E2F30700D94DA5 /* KeyboardObservering.swift */; };
|
||||
3AAC04A221E2F30700D94DA5 /* KeyboardObserving.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC04A121E2F30700D94DA5 /* KeyboardObserving.swift */; };
|
||||
3AAC04A421E301C400D94DA5 /* ScrollViewFilterKeyboardDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC04A321E301C400D94DA5 /* ScrollViewFilterKeyboardDelegate.swift */; };
|
||||
3AAC04AD21E3A01900D94DA5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC04AC21E3A01900D94DA5 /* AppDelegate.swift */; };
|
||||
3AAC04BC21E3A07500D94DA5 /* ScrollingContentViewController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A5702CE21E2CBB600E4CC55 /* ScrollingContentViewController.framework */; };
|
||||
@@ -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; };
|
||||
@@ -219,7 +219,7 @@
|
||||
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; fileEncoding = 4; lastKnownFileType = text; path = ScrollingContentViewController.podspec; sourceTree = "<group>"; };
|
||||
3AAC048A21E2D3FD00D94DA5 /* ScrollingContentViewController.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; fileEncoding = 4; path = ScrollingContentViewController.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
|
||||
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>"; };
|
||||
@@ -228,7 +228,7 @@
|
||||
3AAC049621E2F01C00D94DA5 /* AdditionalSafeAreaInsetsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdditionalSafeAreaInsetsController.swift; sourceTree = "<group>"; };
|
||||
3AAC049D21E2F18E00D94DA5 /* AdditionalSafeAreaInsetsControlling.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalSafeAreaInsetsControlling.swift; sourceTree = "<group>"; };
|
||||
3AAC049F21E2F28A00D94DA5 /* ScrollViewBounceControlling.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScrollViewBounceControlling.swift; sourceTree = "<group>"; };
|
||||
3AAC04A121E2F30700D94DA5 /* KeyboardObservering.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardObservering.swift; sourceTree = "<group>"; };
|
||||
3AAC04A121E2F30700D94DA5 /* KeyboardObserving.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardObserving.swift; sourceTree = "<group>"; };
|
||||
3AAC04A321E301C400D94DA5 /* ScrollViewFilterKeyboardDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScrollViewFilterKeyboardDelegate.swift; sourceTree = "<group>"; };
|
||||
3AAC04AA21E3A01900D94DA5 /* StoryboardExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StoryboardExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3AAC04AC21E3A01900D94DA5 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
@@ -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,31 +363,12 @@
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3A5702D021E2CBB600E4CC55 /* Source */ = {
|
||||
3A5702D021E2CBB600E4CC55 /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3AAC048E21E2D4C500D94DA5 /* ScrollingContentViewController.swift */,
|
||||
3AAC049021E2D4F100D94DA5 /* ScrollingContentViewManager.swift */,
|
||||
3ADD380B21EBFE8D00396B7A /* ScrollingContentScrollView.swift */,
|
||||
3AAC049421E2F01C00D94DA5 /* KeyboardObserver.swift */,
|
||||
3AAC04A121E2F30700D94DA5 /* KeyboardObservering.swift */,
|
||||
3AD597D221F420ED00F220A0 /* KeyboardNotificationManager.swift */,
|
||||
3AD597D421F4221B00F220A0 /* KeyboardNotificationObserving.swift */,
|
||||
3AF3AA3621FACCAF008AF677 /* ScrollViewFilter.swift */,
|
||||
3AAC04A321E301C400D94DA5 /* ScrollViewFilterKeyboardDelegate.swift */,
|
||||
3AF3AA3821FACCCC008AF677 /* ScrollViewFilterScrollDelegate.swift */,
|
||||
3ADD380921EBFC6200396B7A /* KeyboardFrameEvent.swift */,
|
||||
3AF3AA3A21FCB76E008AF677 /* ScrollRectEvent.swift */,
|
||||
3AAC049521E2F01C00D94DA5 /* ScrollViewBounceController.swift */,
|
||||
3AAC049F21E2F28A00D94DA5 /* ScrollViewBounceControlling.swift */,
|
||||
3AAC049621E2F01C00D94DA5 /* AdditionalSafeAreaInsetsController.swift */,
|
||||
3AAC049D21E2F18E00D94DA5 /* AdditionalSafeAreaInsetsControlling.swift */,
|
||||
3AAC049321E2F01C00D94DA5 /* UIResponder+Current.swift */,
|
||||
3A06577B2200A552005BE8CC /* IsUnitTest.swift */,
|
||||
3A5702D121E2CBB600E4CC55 /* ScrollingContentViewController.h */,
|
||||
3A5702D221E2CBB600E4CC55 /* Info.plist */,
|
||||
3A5B3CB9265D481400E26100 /* ScrollingContentViewController */,
|
||||
);
|
||||
path = Source;
|
||||
path = Sources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3A5702DB21E2CBB600E4CC55 /* Tests */ = {
|
||||
@@ -406,6 +388,32 @@
|
||||
path = Tests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3A5B3CB9265D481400E26100 /* ScrollingContentViewController */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3AAC048E21E2D4C500D94DA5 /* ScrollingContentViewController.swift */,
|
||||
3AAC049021E2D4F100D94DA5 /* ScrollingContentViewManager.swift */,
|
||||
3ADD380B21EBFE8D00396B7A /* ScrollingContentScrollView.swift */,
|
||||
3AAC049421E2F01C00D94DA5 /* KeyboardObserver.swift */,
|
||||
3AAC04A121E2F30700D94DA5 /* KeyboardObserving.swift */,
|
||||
3AD597D221F420ED00F220A0 /* KeyboardNotificationManager.swift */,
|
||||
3AD597D421F4221B00F220A0 /* KeyboardNotificationObserving.swift */,
|
||||
3AF3AA3621FACCAF008AF677 /* ScrollViewFilter.swift */,
|
||||
3AAC04A321E301C400D94DA5 /* ScrollViewFilterKeyboardDelegate.swift */,
|
||||
3AF3AA3821FACCCC008AF677 /* ScrollViewFilterScrollDelegate.swift */,
|
||||
3ADD380921EBFC6200396B7A /* KeyboardFrameEvent.swift */,
|
||||
3AF3AA3A21FCB76E008AF677 /* ScrollRectEvent.swift */,
|
||||
3AAC049521E2F01C00D94DA5 /* ScrollViewBounceController.swift */,
|
||||
3AAC049F21E2F28A00D94DA5 /* ScrollViewBounceControlling.swift */,
|
||||
3AAC049621E2F01C00D94DA5 /* AdditionalSafeAreaInsetsController.swift */,
|
||||
3AAC049D21E2F18E00D94DA5 /* AdditionalSafeAreaInsetsControlling.swift */,
|
||||
3AAC049321E2F01C00D94DA5 /* UIResponder+Current.swift */,
|
||||
3A06577B2200A552005BE8CC /* IsUnitTest.swift */,
|
||||
3A5702D121E2CBB600E4CC55 /* ScrollingContentViewController.h */,
|
||||
);
|
||||
path = ScrollingContentViewController;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3A6273E021E79757008EA567 /* ManagerExample */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -646,30 +654,36 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 1010;
|
||||
LastUpgradeCheck = 1010;
|
||||
LastUpgradeCheck = 1250;
|
||||
ORGANIZATIONNAME = "Oath Inc.";
|
||||
TargetAttributes = {
|
||||
3A5702CD21E2CBB600E4CC55 = {
|
||||
CreatedOnToolsVersion = 10.1;
|
||||
LastSwiftMigration = 1010;
|
||||
LastSwiftMigration = 1020;
|
||||
};
|
||||
3A5702D621E2CBB600E4CC55 = {
|
||||
CreatedOnToolsVersion = 10.1;
|
||||
LastSwiftMigration = 1020;
|
||||
};
|
||||
3A6273DE21E79757008EA567 = {
|
||||
CreatedOnToolsVersion = 10.1;
|
||||
LastSwiftMigration = 1020;
|
||||
};
|
||||
3AAC04A921E3A01900D94DA5 = {
|
||||
CreatedOnToolsVersion = 10.1;
|
||||
LastSwiftMigration = 1020;
|
||||
};
|
||||
3AAC04D921E4514B00D94DA5 = {
|
||||
CreatedOnToolsVersion = 10.1;
|
||||
LastSwiftMigration = 1020;
|
||||
};
|
||||
3AE460E721EA952000B3E547 = {
|
||||
CreatedOnToolsVersion = 10.1;
|
||||
LastSwiftMigration = 1020;
|
||||
};
|
||||
3AE989822206443B006254A4 = {
|
||||
CreatedOnToolsVersion = 10.1;
|
||||
LastSwiftMigration = 1020;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -802,7 +816,7 @@
|
||||
3AAC04A021E2F28A00D94DA5 /* ScrollViewBounceControlling.swift in Sources */,
|
||||
3AAC049E21E2F18E00D94DA5 /* AdditionalSafeAreaInsetsControlling.swift in Sources */,
|
||||
3AD597D521F4221B00F220A0 /* KeyboardNotificationObserving.swift in Sources */,
|
||||
3AAC04A221E2F30700D94DA5 /* KeyboardObservering.swift in Sources */,
|
||||
3AAC04A221E2F30700D94DA5 /* KeyboardObserving.swift in Sources */,
|
||||
3AD597D321F420ED00F220A0 /* KeyboardNotificationManager.swift in Sources */,
|
||||
3AF3AA3B21FCB76E008AF677 /* ScrollRectEvent.swift in Sources */,
|
||||
3A06577C2200A552005BE8CC /* IsUnitTest.swift in Sources */,
|
||||
@@ -998,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;
|
||||
@@ -1024,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;
|
||||
@@ -1062,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;
|
||||
@@ -1082,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;
|
||||
@@ -1105,18 +1121,19 @@
|
||||
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;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
@@ -1132,17 +1149,18 @@
|
||||
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;
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
@@ -1161,7 +1179,7 @@
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.retroactivefiasco.ScrollingContentViewControllerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
@@ -1180,7 +1198,7 @@
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.retroactivefiasco.ScrollingContentViewControllerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
@@ -1199,7 +1217,7 @@
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.retroactivefiasco.ManagerExample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
@@ -1218,7 +1236,7 @@
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.retroactivefiasco.ManagerExample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
@@ -1237,7 +1255,7 @@
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.retroactivefiasco.StoryboardExample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
@@ -1256,7 +1274,7 @@
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.retroactivefiasco.StoryboardExample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
@@ -1275,7 +1293,7 @@
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.retroactivefiasco.CodeExample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
@@ -1294,7 +1312,7 @@
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.retroactivefiasco.CodeExample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
@@ -1313,7 +1331,7 @@
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.retroactivefiasco.SequenceExample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
@@ -1332,7 +1350,7 @@
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.retroactivefiasco.SequenceExample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
@@ -1351,7 +1369,7 @@
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.retroactivefiasco.ReassignExample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
@@ -1370,7 +1388,7 @@
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.retroactivefiasco.ReassignExample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = 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"
|
||||
|
||||
+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.2.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)
|
||||
+2
-2
@@ -20,7 +20,7 @@ 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: KeyboardObservering?
|
||||
private weak var delegate: KeyboardObserving?
|
||||
|
||||
private weak var scrollViewFilter: ScrollViewFilter?
|
||||
|
||||
@@ -31,7 +31,7 @@ internal class KeyboardObserver: NSObject {
|
||||
/// calls to `updateForCurrentKeyboardVisibility`.
|
||||
private var isAdjustingViewForKeyboardFrameEvent = false
|
||||
|
||||
init(scrollViewFilter: ScrollViewFilter, delegate: KeyboardObservering) {
|
||||
init(scrollViewFilter: ScrollViewFilter, delegate: KeyboardObserving) {
|
||||
super.init()
|
||||
|
||||
self.scrollViewFilter = scrollViewFilter
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// KeyboardObservering.swift
|
||||
// KeyboardObserving.swift
|
||||
// ScrollingContentViewController
|
||||
//
|
||||
// Created by Drew Olbrich on 1/6/19.
|
||||
@@ -11,7 +11,7 @@
|
||||
import UIKit
|
||||
|
||||
/// Delegate for `KeyboardObserver`.
|
||||
internal protocol KeyboardObservering: 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:
|
||||
+4
-4
@@ -19,7 +19,7 @@ import UIKit
|
||||
/// `ScrollingContentViewManager` may be used instead.
|
||||
///
|
||||
/// See [https://github.com/drewolbrich/ScrollingContentViewController](https://github.com/drewolbrich/ScrollingContentViewController/blob/master/README.md) for full documentation.
|
||||
public class ScrollingContentViewManager: KeyboardObservering, ScrollViewBounceControlling, AdditionalSafeAreaInsetsControlling {
|
||||
public class ScrollingContentViewManager: KeyboardObserving, ScrollViewBounceControlling, AdditionalSafeAreaInsetsControlling {
|
||||
|
||||
/// The view controller that hosts the scroll view.
|
||||
public private(set) weak var hostViewController: UIViewController?
|
||||
@@ -455,7 +455,7 @@ public class ScrollingContentViewManager: KeyboardObservering, ScrollViewBounceC
|
||||
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.
|
||||
|
||||
@@ -465,7 +465,7 @@ public class ScrollingContentViewManager: KeyboardObservering, ScrollViewBounceC
|
||||
let contentViewMinimumHeightConstraint = contentView.heightAnchor.constraint(greaterThanOrEqualTo: scrollView.safeAreaLayoutGuide.heightAnchor, multiplier: 1)
|
||||
self.contentViewMinimumHeightConstraint = contentViewMinimumHeightConstraint
|
||||
|
||||
let contentViewMinimumHeightForPresentedKeyboardConstraint = contentView.heightAnchor.constraint(equalToConstant: 0)
|
||||
let contentViewMinimumHeightForPresentedKeyboardConstraint = contentView.heightAnchor.constraint(greaterThanOrEqualToConstant: 0)
|
||||
self.contentViewMinimumHeightForPresentedKeyboardConstraint = contentViewMinimumHeightForPresentedKeyboardConstraint
|
||||
|
||||
contentViewMinimumWidthConstraint.priority = minimumSizeConstraintPriority
|
||||
@@ -482,7 +482,7 @@ public class ScrollingContentViewManager: KeyboardObservering, ScrollViewBounceC
|
||||
contentViewMinimumWidthConstraint,
|
||||
contentViewMinimumHeightConstraint,
|
||||
contentViewMinimumHeightForPresentedKeyboardConstraint
|
||||
]
|
||||
]
|
||||
|
||||
NSLayoutConstraint.activate(constraints)
|
||||
|
||||
@@ -118,10 +118,11 @@ class InsetContentViewKeyboardTests: XCTestCase {
|
||||
scrollingContentViewManager.shouldResizeContentViewForKeyboard = true
|
||||
|
||||
let initialContentViewSize = scrollView.safeAreaLayoutGuide.layoutFrame.size
|
||||
let initialBottomSafeAreaInset = rootView.safeAreaInsets.bottom - tabBarHeight
|
||||
|
||||
presentKeyboard()
|
||||
|
||||
let expectedContentViewSize = CGSize(width: initialContentViewSize.width, height: initialContentViewSize.height - (keyboardHeight - tabBarHeight))
|
||||
let expectedContentViewSize = CGSize(width: initialContentViewSize.width, height: initialContentViewSize.height - (keyboardHeight - tabBarHeight) + initialBottomSafeAreaInset)
|
||||
|
||||
XCTAssertEqual(contentView.frame.size, expectedContentViewSize)
|
||||
}
|
||||
|
||||
@@ -105,12 +105,13 @@ class KeyboardTests: XCTestCase {
|
||||
scrollingContentViewManager.shouldResizeContentViewForKeyboard = true
|
||||
|
||||
let initialContentViewSize = rootView.bounds.inset(by: rootView.safeAreaInsets).size
|
||||
let initialBottomSafeAreaInset = rootView.safeAreaInsets.bottom - tabBarHeight
|
||||
|
||||
presentKeyboard()
|
||||
|
||||
// The size of the expected safe area of the view controller's root view after the
|
||||
// keyboard is presented.
|
||||
let expectedContentViewSize = CGSize(width: initialContentViewSize.width, height: initialContentViewSize.height - (keyboardHeight - tabBarHeight))
|
||||
let expectedContentViewSize = CGSize(width: initialContentViewSize.width, height: initialContentViewSize.height - (keyboardHeight - tabBarHeight) + initialBottomSafeAreaInset)
|
||||
|
||||
XCTAssertEqual(contentView.frame.size, expectedContentViewSize)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user