-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from boardbookit/release-2.1
Release 2.1
- Loading branch information
Showing
56 changed files
with
19,214 additions
and
22,636 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
441 changes: 306 additions & 135 deletions
441
SFSymbolsPreview/SFSymbolsPreview.xcodeproj/project.pbxproj
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// | ||
// SymbolList.swift | ||
// SFSymbolsPreview | ||
// | ||
// Created by Richard Witherspoon on 11/18/21. | ||
// | ||
|
||
import SwiftUI | ||
import SFSymbols | ||
|
||
|
||
struct SymbolList: View{ | ||
let category: SFCategory | ||
@State private var searchText = String() | ||
|
||
init(category: SFCategory) { | ||
self.category = SFCategory.allCategories.first(where: {$0.plistTitle == category.title})! | ||
} | ||
|
||
func searchResults()->[SFSymbol]{ | ||
if searchText.isEmpty{ | ||
return category.symbols | ||
} | ||
|
||
return category.symbols.filter({ | ||
$0.title.localizedCaseInsensitiveContains(searchText) || | ||
$0.searchTerms?.contains(where: {$0.localizedCaseInsensitiveContains(searchText)}) ?? false | ||
}) | ||
} | ||
|
||
|
||
var body: some View{ | ||
List(searchResults()){ symbol in | ||
Label(symbol.title, systemImage: symbol.title) | ||
} | ||
.navigationTitle(category.title) | ||
.animation(.default, value: searchText) | ||
#if os(iOS) | ||
.searchable(text: $searchText, placement: .navigationBarDrawer) | ||
#elseif os(macOS) | ||
.searchable(text: $searchText) | ||
#endif | ||
} | ||
} | ||
|
||
|
||
struct SymbolList_Previews: PreviewProvider { | ||
static var previews: some View { | ||
SymbolList(category: .whatsnew) | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict/> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.app-sandbox</key> | ||
<true/> | ||
<key>com.apple.security.files.downloads.read-write</key> | ||
<true/> | ||
</dict> | ||
</plist> |
Oops, something went wrong.