完善任务流程、键盘适配与页面交互
This commit is contained in:
75
Pods/IQKeyboardCore/README.md
generated
Normal file
75
Pods/IQKeyboardCore/README.md
generated
Normal file
@ -0,0 +1,75 @@
|
||||
# IQKeyboardCore
|
||||
|
||||
[](https://travis-ci.org/hackiftekhar/IQKeyboardCore)
|
||||
[](https://cocoapods.org/pods/IQKeyboardCore)
|
||||
[](https://cocoapods.org/pods/IQKeyboardCore)
|
||||
[](https://cocoapods.org/pods/IQKeyboardCore)
|
||||
|
||||
## Example
|
||||
|
||||
To run the example project, clone the repo, and run `pod install` from the Example directory first.
|
||||
|
||||
## Requirements
|
||||
|
||||
## Installation
|
||||
|
||||
IQKeyboardCore is available through [CocoaPods](https://cocoapods.org). To install
|
||||
it, simply add the following line to your Podfile:
|
||||
|
||||
```ruby
|
||||
pod 'IQKeyboardCore'
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
IQKeyboardCore is not intended to use independently. It's just a helper and extension for most of the IQKeyboard related libraries
|
||||
|
||||
This contains IQTextInputView protocol
|
||||
```swift
|
||||
@objc public protocol IQTextInputView where Self: UIView, Self: UITextInputTraits {
|
||||
}
|
||||
```
|
||||
UITextField, UITextView and UISearchBar are the known classes who adopted this protocol within the library
|
||||
|
||||
```swift
|
||||
@objc extension UITextField: IQTextInputView {...}
|
||||
|
||||
@objc extension UITextView: IQTextInputView {...}
|
||||
|
||||
@objc extension UISearchBar: IQTextInputView {...}
|
||||
```
|
||||
|
||||
This library also contains IQEnableMode which is used by other libraries
|
||||
```swift
|
||||
@objc public enum IQEnableMode: Int {
|
||||
case `default`
|
||||
case enabled
|
||||
case disabled
|
||||
}
|
||||
```
|
||||
|
||||
There are other extension functions which are available on UIView
|
||||
```swift
|
||||
public extension IQKeyboardExtension where Base: UIView {
|
||||
func viewContainingController() -> UIViewController?
|
||||
func superviewOf<T: UIView>(type classType: T.Type, belowView: UIView? = nil) -> T?
|
||||
func textFieldSearchBar() -> UISearchBar?
|
||||
func isAlertViewTextField() -> Bool
|
||||
}
|
||||
```
|
||||
|
||||
Above extension functions can be used like below
|
||||
```swift
|
||||
view.iq.viewContainingController()
|
||||
view.iq.superviewOf(type: UIScrollView.self)
|
||||
view.iq.textFieldSearchBar()
|
||||
view.iq.isAlertViewTextField()
|
||||
```
|
||||
|
||||
## Author
|
||||
|
||||
hackiftekhar, ideviftekhar@gmail.com
|
||||
|
||||
## License
|
||||
|
||||
IQKeyboardCore is available under the MIT license. See the LICENSE file for more info.
|
||||
Reference in New Issue
Block a user