Skip to content

Commit

Permalink
Readme updated
Browse files Browse the repository at this point in the history
  • Loading branch information
rushisangani committed Jun 18, 2020
1 parent 4f9dbe4 commit 6c8f467
Showing 1 changed file with 18 additions and 31 deletions.
49 changes: 18 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@ An elegant selection list or dropdown menu for iOS with single or multiple selec
- Provide header row as **Empty**, **All**, **None** or **Custom Text**
- Customizable design for UINavigationBar and UISearchBar

## What's new in 6.1.0
- Use **.bottomSheet** instead of '.actionSheet' to support themes in iOS 13.
- Now you can use both **CustomClass** and **CustomNib** for UITableViewCell.
## What's new in 7.0.0
- Supported **Equatable** conformance

## Already using? Migrate to 7.0.0
- Remove all references of `UniquePropertyDelegate`, `uniquePropertyName`, and `getUniquePropertyName()`
- Conform to `Equatable` in your model classes (if required)

## Requirements
```swift
Expand All @@ -34,7 +37,7 @@ iOS 9.0+ | Xcode 8.3+ | Swift 3.0+
### CocoaPods

```ruby
pod 'RSSelectionMenu' or pod 'RSSelectionMenu', '~> 6.1.0'
pod 'RSSelectionMenu' or pod 'RSSelectionMenu', '~> 7.0.0'
```

### Carthage
Expand All @@ -51,7 +54,7 @@ $ brew install carthage
To integrate RSSelectionMenu into your Xcode project using Carthage, specify it in your `Cartfile`:

```ogdl
github "rushisangani/RSSelectionMenu" ~> 6.0
github "rushisangani/RSSelectionMenu" ~> 7.0
```
Then follow below steps:
- Run `carthage update` to build the framework.
Expand Down Expand Up @@ -246,10 +249,17 @@ menu.showEmptyDataLabel()
menu.showEmptyDataLabel(text: "No players found")
```

### DataSource - Codable Objects, NSObject Subclasses or Dictionary Array
- Implement **UniquePropertyDelegate** protocol to model class or structure.
### DataSource - Equatable conformance
```swift
struct Employee: Equatable {

let empId: Int?
let name: String?
}
```
or
```swift
class Person: NSObject, UniquePropertyDelegate {
class Person: NSObject {

let id: Int
let firstName: String
Expand All @@ -260,31 +270,8 @@ class Person: NSObject, UniquePropertyDelegate {
self.firstName = firstName
self.lastName = lastName
}

// MARK: - UniquePropertyDelegate
// Here id has the unique value for each person

func getUniquePropertyName() -> String {
return "id"
}
}
```
or
```swift
struct Employee: Codable, UniquePropertyDelegate {

let empId: Int?
let name: String?

func getUniquePropertyName() -> String {
return "empId"
}
}
```
or
```swift
selectionMenu.uniquePropertyName = "empId" or "keyname of unique value in dictionary"
```

### UI Customization

Expand Down

0 comments on commit 6c8f467

Please sign in to comment.