├── README.md
├── UIBlurEffectStyle
├── UIBlurEffectStyle.sketch
└── UIBlurEffectStyle
│ ├── Test.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ ├── bobby.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ │ │ └── sebastienvillar.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ ├── bobby.xcuserdatad
│ │ └── xcschemes
│ │ │ ├── Test.xcscheme
│ │ │ └── xcschememanagement.plist
│ │ └── sebastienvillar.xcuserdatad
│ │ └── xcschemes
│ │ ├── Test.xcscheme
│ │ └── xcschememanagement.plist
│ └── Test
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Contents.json
│ └── image.imageset
│ │ ├── Contents.json
│ │ └── Sketch_White.png
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
└── UIFontTextStyle
├── UIFontTextStyle.playground
├── Contents.swift
├── contents.xcplayground
└── playground.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ └── bobby.xcuserdatad
│ └── UserInterfaceState.xcuserstate
└── UIFontTextStyle.sketch
/README.md:
--------------------------------------------------------------------------------
1 | # Sketch iOS Library
2 |
3 | I’ve decided to take styles from Xcode and do my best to replicate them for Sketch. Along the way, I documented the process of how I ended up with the result so you can look into things even further.
4 |
5 | You'll need to download Apple's SF font: https://developer.apple.com/fonts/
6 |
7 | ## UIBlurEffectStyle
8 | The API doesn't provide any specs for blurs, so it's a challenge to replicate. For performance concerns, I understand why Apple isn't open about these specs. However, as designers I think we shuold be aware of these constraints and design with them.
9 |
10 | #### Usage
11 | 1. Open [`UIBlurEffectStyle.sketch`](https://github.com/bgian/Sketch-iOS-Library/blob/master/UIBlurEffectStyle/UIBlurEffectStyle.sketch)
12 | 2. Copy style of a blur type
13 | 3. Paste style to any shape
14 |
15 | #### Process
16 | 1. Created a few colorful shapes to blur
17 | 2. Rendered and exported all three [types of blur](https://developer.apple.com/reference/uikit/uiblureffectstyle) over the shapes in Xcode:
18 | - `extraLight`
19 | - `light`
20 | - `dark`
21 | 3. Replicated each blur type in Sketch
22 |
23 | ## UIFontTextStyle
24 | Apple’s system fonts are designed for legibility and provide a variety of sizes which automatically react to accessibility features. You can read more about why it’s best to use system fonts on the [iOS Human Interface Guidelines](https://developer.apple.com/ios/human-interface-guidelines/visual-design/typography/).
25 |
26 | #### Usage
27 | 1. Open [`UIFontTextStyle.sketch`](https://github.com/bgian/Sketch-iOS-Library/blob/master/UIFontTextStyle/UIFontTextStyle.sketch)
28 | 2. Copy & Paste artboard into Sketch document
29 | 3. Assign texts to a system style
30 |
31 | #### Process
32 | 1. Made a list of all ten text styles:
33 | - `Title1`
34 | - `Title2`
35 | - `Title3`
36 | - `Headline`
37 | - `Subhead`
38 | - `Body`
39 | - `Footnote`
40 | - `Caption1`
41 | - `Caption2`
42 | - `Callout`
43 | 2. Printed out the specs in Xcode (e.g. `UIFontTextStyle(_rawValue: UICTFontTextStyleTitle1): .SFUIDisplay-Light, 28`)
44 | 3. Used font tracking [designcode.io](https://designcode.io/cloud/chapter1/iOS-Tracking.jpg) recommends
45 |
46 | ## Get Involved
47 |
48 | #### Suggest a style
49 | 1. Create a [new issue](https://github.com/bgian/Sketch-iOS-Library/issues/new)
50 | 2. Describe the iOS style that should be replicated
51 | 3. ✨ Bonus: Follow the issue to provide feedback
52 |
53 | #### Leave feedback
54 | 1. Create a [new issue](https://github.com/bgian/Sketch-iOS-Library/issues/new)
55 | 2. Mention which style you have feedback on
56 | 3. ✨ Bonus: Follow the issue to provide feedback
57 |
58 | #### Ask a question
59 | - @_bgian
60 | - hi@bobby.so
61 | - Messenger
62 |
--------------------------------------------------------------------------------
/UIBlurEffectStyle/UIBlurEffectStyle.sketch:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bgian/Sketch-iOS-Library/fb44cbbf08093e001e0b30b2e752705fb615c56b/UIBlurEffectStyle/UIBlurEffectStyle.sketch
--------------------------------------------------------------------------------
/UIBlurEffectStyle/UIBlurEffectStyle/Test.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 4D0C65141D89E8D600CFF7CC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D0C65131D89E8D600CFF7CC /* AppDelegate.swift */; };
11 | 4D0C65161D89E8D700CFF7CC /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D0C65151D89E8D700CFF7CC /* ViewController.swift */; };
12 | 4D0C65191D89E8D700CFF7CC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4D0C65171D89E8D700CFF7CC /* Main.storyboard */; };
13 | 4D0C651B1D89E8D700CFF7CC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4D0C651A1D89E8D700CFF7CC /* Assets.xcassets */; };
14 | 4D0C651E1D89E8D700CFF7CC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4D0C651C1D89E8D700CFF7CC /* LaunchScreen.storyboard */; };
15 | /* End PBXBuildFile section */
16 |
17 | /* Begin PBXFileReference section */
18 | 4D0C65101D89E8D600CFF7CC /* Test.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Test.app; sourceTree = BUILT_PRODUCTS_DIR; };
19 | 4D0C65131D89E8D600CFF7CC /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
20 | 4D0C65151D89E8D700CFF7CC /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
21 | 4D0C65181D89E8D700CFF7CC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
22 | 4D0C651A1D89E8D700CFF7CC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
23 | 4D0C651D1D89E8D700CFF7CC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
24 | 4D0C651F1D89E8D700CFF7CC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
25 | /* End PBXFileReference section */
26 |
27 | /* Begin PBXFrameworksBuildPhase section */
28 | 4D0C650D1D89E8D600CFF7CC /* Frameworks */ = {
29 | isa = PBXFrameworksBuildPhase;
30 | buildActionMask = 2147483647;
31 | files = (
32 | );
33 | runOnlyForDeploymentPostprocessing = 0;
34 | };
35 | /* End PBXFrameworksBuildPhase section */
36 |
37 | /* Begin PBXGroup section */
38 | 4D0C65071D89E8D600CFF7CC = {
39 | isa = PBXGroup;
40 | children = (
41 | 4D0C65121D89E8D600CFF7CC /* Test */,
42 | 4D0C65111D89E8D600CFF7CC /* Products */,
43 | );
44 | sourceTree = "";
45 | };
46 | 4D0C65111D89E8D600CFF7CC /* Products */ = {
47 | isa = PBXGroup;
48 | children = (
49 | 4D0C65101D89E8D600CFF7CC /* Test.app */,
50 | );
51 | name = Products;
52 | sourceTree = "";
53 | };
54 | 4D0C65121D89E8D600CFF7CC /* Test */ = {
55 | isa = PBXGroup;
56 | children = (
57 | 4D0C65131D89E8D600CFF7CC /* AppDelegate.swift */,
58 | 4D0C65151D89E8D700CFF7CC /* ViewController.swift */,
59 | 4D0C65171D89E8D700CFF7CC /* Main.storyboard */,
60 | 4D0C651A1D89E8D700CFF7CC /* Assets.xcassets */,
61 | 4D0C651C1D89E8D700CFF7CC /* LaunchScreen.storyboard */,
62 | 4D0C651F1D89E8D700CFF7CC /* Info.plist */,
63 | );
64 | path = Test;
65 | sourceTree = "";
66 | };
67 | /* End PBXGroup section */
68 |
69 | /* Begin PBXNativeTarget section */
70 | 4D0C650F1D89E8D600CFF7CC /* Test */ = {
71 | isa = PBXNativeTarget;
72 | buildConfigurationList = 4D0C65221D89E8D700CFF7CC /* Build configuration list for PBXNativeTarget "Test" */;
73 | buildPhases = (
74 | 4D0C650C1D89E8D600CFF7CC /* Sources */,
75 | 4D0C650D1D89E8D600CFF7CC /* Frameworks */,
76 | 4D0C650E1D89E8D600CFF7CC /* Resources */,
77 | );
78 | buildRules = (
79 | );
80 | dependencies = (
81 | );
82 | name = Test;
83 | productName = Test;
84 | productReference = 4D0C65101D89E8D600CFF7CC /* Test.app */;
85 | productType = "com.apple.product-type.application";
86 | };
87 | /* End PBXNativeTarget section */
88 |
89 | /* Begin PBXProject section */
90 | 4D0C65081D89E8D600CFF7CC /* Project object */ = {
91 | isa = PBXProject;
92 | attributes = {
93 | LastSwiftUpdateCheck = 0800;
94 | LastUpgradeCheck = 0800;
95 | ORGANIZATIONNAME = "-";
96 | TargetAttributes = {
97 | 4D0C650F1D89E8D600CFF7CC = {
98 | CreatedOnToolsVersion = 8.0;
99 | DevelopmentTeam = DCEXXCU8DB;
100 | ProvisioningStyle = Automatic;
101 | };
102 | };
103 | };
104 | buildConfigurationList = 4D0C650B1D89E8D600CFF7CC /* Build configuration list for PBXProject "Test" */;
105 | compatibilityVersion = "Xcode 3.2";
106 | developmentRegion = English;
107 | hasScannedForEncodings = 0;
108 | knownRegions = (
109 | en,
110 | Base,
111 | );
112 | mainGroup = 4D0C65071D89E8D600CFF7CC;
113 | productRefGroup = 4D0C65111D89E8D600CFF7CC /* Products */;
114 | projectDirPath = "";
115 | projectRoot = "";
116 | targets = (
117 | 4D0C650F1D89E8D600CFF7CC /* Test */,
118 | );
119 | };
120 | /* End PBXProject section */
121 |
122 | /* Begin PBXResourcesBuildPhase section */
123 | 4D0C650E1D89E8D600CFF7CC /* Resources */ = {
124 | isa = PBXResourcesBuildPhase;
125 | buildActionMask = 2147483647;
126 | files = (
127 | 4D0C651E1D89E8D700CFF7CC /* LaunchScreen.storyboard in Resources */,
128 | 4D0C651B1D89E8D700CFF7CC /* Assets.xcassets in Resources */,
129 | 4D0C65191D89E8D700CFF7CC /* Main.storyboard in Resources */,
130 | );
131 | runOnlyForDeploymentPostprocessing = 0;
132 | };
133 | /* End PBXResourcesBuildPhase section */
134 |
135 | /* Begin PBXSourcesBuildPhase section */
136 | 4D0C650C1D89E8D600CFF7CC /* Sources */ = {
137 | isa = PBXSourcesBuildPhase;
138 | buildActionMask = 2147483647;
139 | files = (
140 | 4D0C65161D89E8D700CFF7CC /* ViewController.swift in Sources */,
141 | 4D0C65141D89E8D600CFF7CC /* AppDelegate.swift in Sources */,
142 | );
143 | runOnlyForDeploymentPostprocessing = 0;
144 | };
145 | /* End PBXSourcesBuildPhase section */
146 |
147 | /* Begin PBXVariantGroup section */
148 | 4D0C65171D89E8D700CFF7CC /* Main.storyboard */ = {
149 | isa = PBXVariantGroup;
150 | children = (
151 | 4D0C65181D89E8D700CFF7CC /* Base */,
152 | );
153 | name = Main.storyboard;
154 | sourceTree = "";
155 | };
156 | 4D0C651C1D89E8D700CFF7CC /* LaunchScreen.storyboard */ = {
157 | isa = PBXVariantGroup;
158 | children = (
159 | 4D0C651D1D89E8D700CFF7CC /* Base */,
160 | );
161 | name = LaunchScreen.storyboard;
162 | sourceTree = "";
163 | };
164 | /* End PBXVariantGroup section */
165 |
166 | /* Begin XCBuildConfiguration section */
167 | 4D0C65201D89E8D700CFF7CC /* Debug */ = {
168 | isa = XCBuildConfiguration;
169 | buildSettings = {
170 | ALWAYS_SEARCH_USER_PATHS = NO;
171 | CLANG_ANALYZER_NONNULL = YES;
172 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
173 | CLANG_CXX_LIBRARY = "libc++";
174 | CLANG_ENABLE_MODULES = YES;
175 | CLANG_ENABLE_OBJC_ARC = YES;
176 | CLANG_WARN_BOOL_CONVERSION = YES;
177 | CLANG_WARN_CONSTANT_CONVERSION = YES;
178 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
179 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
180 | CLANG_WARN_EMPTY_BODY = YES;
181 | CLANG_WARN_ENUM_CONVERSION = YES;
182 | CLANG_WARN_INFINITE_RECURSION = YES;
183 | CLANG_WARN_INT_CONVERSION = YES;
184 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
185 | CLANG_WARN_SUSPICIOUS_MOVES = YES;
186 | CLANG_WARN_UNREACHABLE_CODE = YES;
187 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
188 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
189 | COPY_PHASE_STRIP = NO;
190 | DEBUG_INFORMATION_FORMAT = dwarf;
191 | ENABLE_STRICT_OBJC_MSGSEND = YES;
192 | ENABLE_TESTABILITY = YES;
193 | GCC_C_LANGUAGE_STANDARD = gnu99;
194 | GCC_DYNAMIC_NO_PIC = NO;
195 | GCC_NO_COMMON_BLOCKS = YES;
196 | GCC_OPTIMIZATION_LEVEL = 0;
197 | GCC_PREPROCESSOR_DEFINITIONS = (
198 | "DEBUG=1",
199 | "$(inherited)",
200 | );
201 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
202 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
203 | GCC_WARN_UNDECLARED_SELECTOR = YES;
204 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
205 | GCC_WARN_UNUSED_FUNCTION = YES;
206 | GCC_WARN_UNUSED_VARIABLE = YES;
207 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
208 | MTL_ENABLE_DEBUG_INFO = YES;
209 | ONLY_ACTIVE_ARCH = YES;
210 | SDKROOT = iphoneos;
211 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
212 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
213 | };
214 | name = Debug;
215 | };
216 | 4D0C65211D89E8D700CFF7CC /* Release */ = {
217 | isa = XCBuildConfiguration;
218 | buildSettings = {
219 | ALWAYS_SEARCH_USER_PATHS = NO;
220 | CLANG_ANALYZER_NONNULL = YES;
221 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
222 | CLANG_CXX_LIBRARY = "libc++";
223 | CLANG_ENABLE_MODULES = YES;
224 | CLANG_ENABLE_OBJC_ARC = YES;
225 | CLANG_WARN_BOOL_CONVERSION = YES;
226 | CLANG_WARN_CONSTANT_CONVERSION = YES;
227 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
228 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
229 | CLANG_WARN_EMPTY_BODY = YES;
230 | CLANG_WARN_ENUM_CONVERSION = YES;
231 | CLANG_WARN_INFINITE_RECURSION = YES;
232 | CLANG_WARN_INT_CONVERSION = YES;
233 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
234 | CLANG_WARN_SUSPICIOUS_MOVES = YES;
235 | CLANG_WARN_UNREACHABLE_CODE = YES;
236 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
237 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
238 | COPY_PHASE_STRIP = NO;
239 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
240 | ENABLE_NS_ASSERTIONS = NO;
241 | ENABLE_STRICT_OBJC_MSGSEND = YES;
242 | GCC_C_LANGUAGE_STANDARD = gnu99;
243 | GCC_NO_COMMON_BLOCKS = YES;
244 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
245 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
246 | GCC_WARN_UNDECLARED_SELECTOR = YES;
247 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
248 | GCC_WARN_UNUSED_FUNCTION = YES;
249 | GCC_WARN_UNUSED_VARIABLE = YES;
250 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
251 | MTL_ENABLE_DEBUG_INFO = NO;
252 | SDKROOT = iphoneos;
253 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
254 | VALIDATE_PRODUCT = YES;
255 | };
256 | name = Release;
257 | };
258 | 4D0C65231D89E8D700CFF7CC /* Debug */ = {
259 | isa = XCBuildConfiguration;
260 | buildSettings = {
261 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
262 | DEVELOPMENT_TEAM = DCEXXCU8DB;
263 | INFOPLIST_FILE = Test/Info.plist;
264 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
265 | PRODUCT_BUNDLE_IDENTIFIER = .Test;
266 | PRODUCT_NAME = "$(TARGET_NAME)";
267 | SWIFT_VERSION = 3.0;
268 | };
269 | name = Debug;
270 | };
271 | 4D0C65241D89E8D700CFF7CC /* Release */ = {
272 | isa = XCBuildConfiguration;
273 | buildSettings = {
274 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
275 | DEVELOPMENT_TEAM = DCEXXCU8DB;
276 | INFOPLIST_FILE = Test/Info.plist;
277 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
278 | PRODUCT_BUNDLE_IDENTIFIER = .Test;
279 | PRODUCT_NAME = "$(TARGET_NAME)";
280 | SWIFT_VERSION = 3.0;
281 | };
282 | name = Release;
283 | };
284 | /* End XCBuildConfiguration section */
285 |
286 | /* Begin XCConfigurationList section */
287 | 4D0C650B1D89E8D600CFF7CC /* Build configuration list for PBXProject "Test" */ = {
288 | isa = XCConfigurationList;
289 | buildConfigurations = (
290 | 4D0C65201D89E8D700CFF7CC /* Debug */,
291 | 4D0C65211D89E8D700CFF7CC /* Release */,
292 | );
293 | defaultConfigurationIsVisible = 0;
294 | defaultConfigurationName = Release;
295 | };
296 | 4D0C65221D89E8D700CFF7CC /* Build configuration list for PBXNativeTarget "Test" */ = {
297 | isa = XCConfigurationList;
298 | buildConfigurations = (
299 | 4D0C65231D89E8D700CFF7CC /* Debug */,
300 | 4D0C65241D89E8D700CFF7CC /* Release */,
301 | );
302 | defaultConfigurationIsVisible = 0;
303 | defaultConfigurationName = Release;
304 | };
305 | /* End XCConfigurationList section */
306 | };
307 | rootObject = 4D0C65081D89E8D600CFF7CC /* Project object */;
308 | }
309 |
--------------------------------------------------------------------------------
/UIBlurEffectStyle/UIBlurEffectStyle/Test.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/UIBlurEffectStyle/UIBlurEffectStyle/Test.xcodeproj/project.xcworkspace/xcuserdata/bobby.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bgian/Sketch-iOS-Library/fb44cbbf08093e001e0b30b2e752705fb615c56b/UIBlurEffectStyle/UIBlurEffectStyle/Test.xcodeproj/project.xcworkspace/xcuserdata/bobby.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/UIBlurEffectStyle/UIBlurEffectStyle/Test.xcodeproj/project.xcworkspace/xcuserdata/sebastienvillar.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bgian/Sketch-iOS-Library/fb44cbbf08093e001e0b30b2e752705fb615c56b/UIBlurEffectStyle/UIBlurEffectStyle/Test.xcodeproj/project.xcworkspace/xcuserdata/sebastienvillar.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/UIBlurEffectStyle/UIBlurEffectStyle/Test.xcodeproj/xcuserdata/bobby.xcuserdatad/xcschemes/Test.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/UIBlurEffectStyle/UIBlurEffectStyle/Test.xcodeproj/xcuserdata/bobby.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Test.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 4D0C650F1D89E8D600CFF7CC
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/UIBlurEffectStyle/UIBlurEffectStyle/Test.xcodeproj/xcuserdata/sebastienvillar.xcuserdatad/xcschemes/Test.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/UIBlurEffectStyle/UIBlurEffectStyle/Test.xcodeproj/xcuserdata/sebastienvillar.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Test.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 4D0C650F1D89E8D600CFF7CC
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/UIBlurEffectStyle/UIBlurEffectStyle/Test/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // Test
4 | //
5 | // Created by Sebastien Villar on 14/09/16.
6 | // Copyright © 2016 -. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/UIBlurEffectStyle/UIBlurEffectStyle/Test/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | }
43 | ],
44 | "info" : {
45 | "version" : 1,
46 | "author" : "xcode"
47 | }
48 | }
--------------------------------------------------------------------------------
/UIBlurEffectStyle/UIBlurEffectStyle/Test/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/UIBlurEffectStyle/UIBlurEffectStyle/Test/Assets.xcassets/image.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "Sketch_White.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/UIBlurEffectStyle/UIBlurEffectStyle/Test/Assets.xcassets/image.imageset/Sketch_White.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bgian/Sketch-iOS-Library/fb44cbbf08093e001e0b30b2e752705fb615c56b/UIBlurEffectStyle/UIBlurEffectStyle/Test/Assets.xcassets/image.imageset/Sketch_White.png
--------------------------------------------------------------------------------
/UIBlurEffectStyle/UIBlurEffectStyle/Test/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/UIBlurEffectStyle/UIBlurEffectStyle/Test/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/UIBlurEffectStyle/UIBlurEffectStyle/Test/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/UIBlurEffectStyle/UIBlurEffectStyle/Test/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Test
4 | //
5 | // Created by Sebastien Villar on 14/09/16.
6 | // Copyright © 2016 -. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 |
16 | let image = UIImage(named: "image")
17 | let imageView = UIImageView(image: image)
18 | imageView.sizeToFit()
19 | view.addSubview(imageView)
20 |
21 |
22 | let whiteView = UIView()
23 | // whiteView.backgroundColor = UIColor.white
24 | whiteView.frame = imageView.frame
25 | let visualView = UIVisualEffectView(effect: UIBlurEffect(style: .dark))
26 | visualView.contentView.addSubview(whiteView)
27 | view.addSubview(visualView)
28 | visualView.frame = imageView.frame
29 |
30 | // Do any additional setup after loading the view, typically from a nib.
31 | }
32 |
33 | override func didReceiveMemoryWarning() {
34 | super.didReceiveMemoryWarning()
35 | // Dispose of any resources that can be recreated.
36 | }
37 |
38 |
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/UIFontTextStyle/UIFontTextStyle.playground/Contents.swift:
--------------------------------------------------------------------------------
1 | //: Playground - noun: a place where people can play
2 |
3 | import UIKit
4 |
5 | let styles = [
6 | UIFontTextStyle.title1,
7 | UIFontTextStyle.title2,
8 | UIFontTextStyle.title3,
9 | UIFontTextStyle.headline,
10 | UIFontTextStyle.body,
11 | UIFontTextStyle.callout,
12 | UIFontTextStyle.subheadline,
13 | UIFontTextStyle.footnote,
14 | UIFontTextStyle.caption1,
15 | UIFontTextStyle.caption2
16 | ]
17 |
18 | styles.forEach { style in
19 | let font = UIFont.preferredFont(forTextStyle: style)
20 | print("\(style): \(font.fontName), \(Int(font.pointSize))")
21 | }
22 |
--------------------------------------------------------------------------------
/UIFontTextStyle/UIFontTextStyle.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/UIFontTextStyle/UIFontTextStyle.playground/playground.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/UIFontTextStyle/UIFontTextStyle.playground/playground.xcworkspace/xcuserdata/bobby.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bgian/Sketch-iOS-Library/fb44cbbf08093e001e0b30b2e752705fb615c56b/UIFontTextStyle/UIFontTextStyle.playground/playground.xcworkspace/xcuserdata/bobby.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/UIFontTextStyle/UIFontTextStyle.sketch:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bgian/Sketch-iOS-Library/fb44cbbf08093e001e0b30b2e752705fb615c56b/UIFontTextStyle/UIFontTextStyle.sketch
--------------------------------------------------------------------------------