这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
70BA1FF827EEB53C000C2567 /* SFReadableSymbols in Frameworks */ = {isa = PBXBuildFile; productRef = 70BA1FF727EEB53C000C2567 /* SFReadableSymbols */; };
70BA1FFB27EEB709000C2567 /* SFSafeSymbols in Frameworks */ = {isa = PBXBuildFile; productRef = 70BA1FFA27EEB709000C2567 /* SFSafeSymbols */; };
70BA1FFF27EEB9B5000C2567 /* SFSafeSymbols in Frameworks */ = {isa = PBXBuildFile; productRef = 70BA1FFE27EEB9B5000C2567 /* SFSafeSymbols */; };
70F08DA228140DDD0053D8E5 /* SymbolsView_3_3.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70F08DA128140DDD0053D8E5 /* SymbolsView_3_3.swift */; };
70F08DA328140DDD0053D8E5 /* SymbolsView_3_3.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70F08DA128140DDD0053D8E5 /* SymbolsView_3_3.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -67,6 +69,7 @@
70BA1FDA27EEB492000C2567 /* Tests_macOS.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests_macOS.swift; sourceTree = "<group>"; };
70BA1FDC27EEB492000C2567 /* Tests_macOSLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests_macOSLaunchTests.swift; sourceTree = "<group>"; };
70BA1FF327EEB4EE000C2567 /* SFReadableSymbols */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = SFReadableSymbols; path = ..; sourceTree = "<group>"; };
70F08DA128140DDD0053D8E5 /* SymbolsView_3_3.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolsView_3_3.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -121,6 +124,7 @@
70BA1FB527EEB490000C2567 /* Shared */ = {
isa = PBXGroup;
children = (
70F08DA028140DC20053D8E5 /* Example */,
70BA1FB627EEB490000C2567 /* ExampleApp.swift */,
70BA1FB727EEB490000C2567 /* ContentView.swift */,
70BA1FB827EEB492000C2567 /* Assets.xcassets */,
Expand Down Expand Up @@ -180,6 +184,14 @@
name = Frameworks;
sourceTree = "<group>";
};
70F08DA028140DC20053D8E5 /* Example */ = {
isa = PBXGroup;
children = (
70F08DA128140DDD0053D8E5 /* SymbolsView_3_3.swift */,
);
path = Example;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -351,6 +363,7 @@
buildActionMask = 2147483647;
files = (
70BA1FE027EEB492000C2567 /* ContentView.swift in Sources */,
70F08DA228140DDD0053D8E5 /* SymbolsView_3_3.swift in Sources */,
70BA1FDE27EEB492000C2567 /* ExampleApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -360,6 +373,7 @@
buildActionMask = 2147483647;
files = (
70BA1FE127EEB492000C2567 /* ContentView.swift in Sources */,
70F08DA328140DDD0053D8E5 /* SymbolsView_3_3.swift in Sources */,
70BA1FDF27EEB492000C2567 /* ExampleApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -522,7 +536,7 @@
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 15.4;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -552,7 +566,7 @@
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 15.4;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

79 changes: 44 additions & 35 deletions Example/Shared/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,51 @@ import SFSafeSymbols

struct ContentView: View {
var body: some View {
List {
//
// SFReadableSymbols.
//
// - ✅ High readable. (WYSIWYG)
// - ✅ Copy and paste from SF Symbols app. (Cmd + C)
// - 🚫 Can't display symbols in GitHub or other editors.
//
Section("SFReadableSymbols") {
Label("Account", symbol: "􀉯")
Image(symbol: "􀫊")
}

//
// Standard API.
//
// - ✅ Copy and paste from SF Symbols app. (Cmd + Shift + C)
// - 🚫 Not compile-time safe.
// - 🚫 Not readable.
//
Section("Standard API") {
Label("Account", systemImage: "person.crop.circle.badge.plus")
Image(systemName: "swift")
}

//
// SFSafeSymbols.
//
// - ✅ Compile-time safe.
// - 🚫 Need type your own. (Possible mistake)
// - 🚫 Even more difficult to read.
//
Section("SFSafeSymbols") {
Label("Account", systemSymbol: .personCropCircleBadgePlus)
Image(systemSymbol: .swift)
NavigationView {
List {
//
// SFReadableSymbols.
//
// - ✅ High readable. (WYSIWYG)
// - ✅ Copy and paste from SF Symbols app. (Cmd + C)
// - 🚫 Can't display symbols in GitHub or other editors.
//
Section("SFReadableSymbols") {
Label("Account", symbol: "􀉯")
Image(symbol: "􀫊")
}

//
// Standard API.
//
// - ✅ Copy and paste from SF Symbols app. (Cmd + Shift + C)
// - 🚫 Not compile-time safe.
// - 🚫 Not readable.
//
Section("Standard API") {
Label("Account", systemImage: "person.crop.circle.badge.plus")
Image(systemName: "swift")
}

//
// SFSafeSymbols.
//
// - ✅ Compile-time safe.
// - 🚫 Need type your own. (Possible mistake)
// - 🚫 Even more difficult to read.
//
Section("SFSafeSymbols") {
Label("Account", systemSymbol: .personCropCircleBadgePlus)
Image(systemSymbol: .swift)
}

NavigationLink {
SymbolsView_3_3()
} label: {
Text("SFSymbols 3.3")
}
}
.navigationTitle("SFReadableSymbols")
}
}
}
28 changes: 28 additions & 0 deletions Example/Shared/Example/SymbolsView_3_3.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//
// SymbolsView_3_3.swift
// Example
//
// Created by Yusuke Hosonuma on 2022/04/23.
//

import SwiftUI

struct SymbolsView_3_3: View {
var body: some View {
List {
Image(symbol: "􁂂")
Image(symbol: "􁂃")
Image(symbol: "􁂄")
Image(symbol: "􁑢")
Image(symbol: "􁎕")
Image(symbol: "􁏺")
Image(symbol: "􁎨")
}
}
}

struct SymbolsView_3_3_Previews: PreviewProvider {
static var previews: some View {
SymbolsView_3_3()
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// SF Symbols version 3.2 (67)
//
// SF Symbols version 3.3 (67.3)
//
let symbolsToName: [Character: String] = [
"􀈂": "square.and.arrow.up",
"􀈃": "square.and.arrow.up.fill",
Expand Down Expand Up @@ -3309,6 +3311,19 @@ let symbolsToName: [Character: String] = [
"􀛡": "50.square",
"􀛢": "50.square.fill",
"􀣺": "applelogo",
//
// 3.3 symbols
//
// - iOS 15.4
// - macOS 12.3
// - tvOS 15.4
// - watchOS 8.5
//
"􁂂": "camera.macro",
"􁂃": "camera.macro.circle",
"􁂄": "camera.macro.circle.fill",
"􁑢": "dots.and.line.vertical.and.cursorarrow.rectangle",
"􁎕": "key.viewfinder",
"􁏺": "person.badge.key",
"􁎨": "person.badge.key.fill",
]