diff --git a/docs/iOS/IMUIInputView_usage.md b/docs/iOS/IMUIInputView_usage.md index d26d0ca1..1532398b 100644 --- a/docs/iOS/IMUIInputView_usage.md +++ b/docs/iOS/IMUIInputView_usage.md @@ -93,14 +93,14 @@ from [0.10.0 Version] you can use ```IMUICustomInputView ``` to customize you in - return left/right/bottom inputBarItemListView's item number - ``` + ```swift func imuiInputView(_ inputBarItemListView: UICollectionView, numberForItemAt position: IMUIInputViewItemPosition) -> Int ``` - retuen left/right/bottom inputBarItemListView's item size - ``` + ```swift func imuiInputView(_ inputBarItemListView: UICollectionView, _ position: IMUIInputViewItemPosition, sizeForIndex indexPath: IndexPath) -> CGSize @@ -108,7 +108,7 @@ from [0.10.0 Version] you can use ```IMUICustomInputView ``` to customize you in - return left/right/bottom inputBarItemListView's item cell - ``` + ```swift func imuiInputView(_ inputBarItemListView: UICollectionView, _ position: IMUIInputViewItemPosition, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell @@ -116,7 +116,7 @@ from [0.10.0 Version] you can use ```IMUICustomInputView ``` to customize you in - return featureView's cell - ``` + ```swift func imuiInputView(_ featureView: UICollectionView, cellForItem indexPath: IndexPath) -> UICollectionViewCell ``` @@ -125,13 +125,13 @@ from [0.10.0 Version] you can use ```IMUICustomInputView ``` to customize you in - Tells the delegate when inputTextview text did change - ``` + ```swift optional func textDidChange(text: String) ``` - Tells the delegate when keyboard will show - ``` + ```swift optional func keyBoardWillShow(height: CGFloat, durationTime: Double) ``` @@ -141,7 +141,7 @@ from [0.10.0 Version] you can use ```IMUICustomInputView ``` to customize you in - register ```UICollectionViewCell``` to specified position, The usage just like ```UICollectionView```. there are two register function: -``` +```swift // register cell with class public func register(_ cellClass: AnyClass?, in position: IMUIInputViewItemPosition, forCellWithReuseIdentifier identifier: String) { } @@ -151,7 +151,7 @@ public func register(_ nib: UINib?,in position: IMUIInputViewItemPosition, forCe example: -``` +```swift customIntputView.self.register( UINib(nibName: "IMUIFeatureListIconCell", bundle: bundle), in: .bottom, @@ -175,7 +175,7 @@ example: - featureView also need to register ```UICollectionViewCell ``` to featureView, there are two register function: - ``` + ```swift // register cell with class public func registerForFeatureView(_ cellClass: AnyClass?, forCellWithReuseIdentifier identifier: String) { } @@ -187,7 +187,7 @@ example: example: - ``` + ```swift customInputView.registerForFeatureView( UINib(nibName: "IMUIRecordVoiceCell", bundle: bundle), forCellWithReuseIdentifier: "IMUIRecordVoiceCell" @@ -206,7 +206,7 @@ example: Sometime you need to update inputView's item(ex: if textView's text is empty, you want to set send button's color to gray that mean the button is unable to click), You can use the following methods: -``` +```swift //update inputBar's item public func updateInputBarItemCell(_ position: IMUIInputViewItemPosition, at index: Int) @@ -217,13 +217,13 @@ public func reloadFeaturnView() ##### show featureView -``` +```swift customInputView.showFeatureView() ``` ##### hidden featureView -``` +```swift customInputView.hideFeatureView() ```