Skip to content

Commit

Permalink
udpate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
huangminlinux committed Apr 16, 2018
1 parent 9006cc9 commit a4eac35
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions docs/iOS/IMUIInputView_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,30 +93,30 @@ 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
```

- return left/right/bottom inputBarItemListView's item cell

```
```swift
func imuiInputView(_ inputBarItemListView: UICollectionView,
_ position: IMUIInputViewItemPosition,
cellForItemAt indexPath: IndexPath) -> UICollectionViewCell
```

- return featureView's cell

```
```swift
func imuiInputView(_ featureView: UICollectionView,
cellForItem indexPath: IndexPath) -> UICollectionViewCell
```
Expand All @@ -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)
```

Expand All @@ -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) { }

Expand All @@ -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,
Expand All @@ -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) { }
Expand All @@ -187,7 +187,7 @@ example:

example:

```
```swift
customInputView.registerForFeatureView(
UINib(nibName: "IMUIRecordVoiceCell", bundle: bundle),
forCellWithReuseIdentifier: "IMUIRecordVoiceCell"
Expand All @@ -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)
Expand All @@ -217,13 +217,13 @@ public func reloadFeaturnView()

##### show featureView

```
```swift
customInputView.showFeatureView()
```

##### hidden featureView

```
```swift
customInputView.hideFeatureView()
```

0 comments on commit a4eac35

Please sign in to comment.