Skip to content

Commit

Permalink
Merge pull request #12 from littleossa/develop
Browse files Browse the repository at this point in the history
Add all to Category enum
  • Loading branch information
littleossa committed Mar 24, 2022
2 parents de32db0 + 1c2508f commit 5de9865
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,27 +70,36 @@ let image = UIImage(symbol: ._1Circle)
Image(symbol: .faceSmiling)
```

### ◆ All Symbols
### ◆ Categorized Symbols

There are 23 categories as with that you can see on SF Symbols App.
they return symbols which can use on your target os version.

if you want to use all Symbols
#### All Symbols

```swift
SFSymbols.allCases
```

it returns all symbols which can use on your target os version.
or

### ◆ Categorized Symbols
```swift
SFSymbols.Category.all.symbols
```

#### Other categories

For example, when you use symbols categorized as Weather

```swift
let weatherSymbols = SFSymbols.Category.weather
```

There are 22 categories as with that you can see on SF Symbols App.
or

they return symbols which can use on your target os version.
```swift
let weatherSymbols = SFSymbols.weatherSymbols
```

## ❓ Why UserFriendly?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ extension SFSymbols {

/// The Category of SF Symbols
public enum Category: String, CaseIterable {
case all = "All"
case new = "What's new"
case multicolor = "Multicolor"
case communication = "Communication"
Expand All @@ -37,6 +38,8 @@ extension SFSymbols {
/// A SF Symbols' collection of the specified category type
public var symbols: [SFSymbols] {
switch self {
case .all:
return SFSymbols.allCases
case .new:
return SFSymbols.whatsNewSymbols
case .multicolor:
Expand Down

0 comments on commit 5de9865

Please sign in to comment.