-
Install needed adobe apps from adobe creative cloud.
-
Open Terminal.
-
Copy-paste the below command to your terminal and run it (enter password when asked).
This file contains hidden or 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
| import SwiftUI | |
| import PlaygroundSupport | |
| // constants | |
| let deviceWidth: CGFloat = 320 | |
| let deviceHeight: CGFloat = 568 | |
| let hasFaceID = true // false for TouchID | |
| struct Device: View { | |
| var body: some View { |
This file contains hidden or 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
| import SwiftUI | |
| import PlaygroundSupport | |
| // constants | |
| let cardWidth: CGFloat = 343 | |
| let cardHeight: CGFloat = 212 | |
| let spacing = 36 | |
| let animation = Animation.spring() | |
| let cardColors = [ | |
| Color(UIColor.systemRed), |
This file contains hidden or 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
| import SwiftUI | |
| import PlaygroundSupport | |
| struct Desktop: View { | |
| var body: some View { | |
| ZStack { | |
| // Image(uiImage: #imageLiteral(resourceName: "IMG_6281.JPG")) | |
| Color(UIColor.systemBlue) | |
| macOS() | |
| } |
This file contains hidden or 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
| # Script to download all the WWDC 2020 session videos in the highest 4K video and audio | |
| # You may have to update ffmpeg before using this script. I needed version 4.3 or higher to successfully download the videos. | |
| # | |
| # If you want the lower bitrate audio, do a find/replace of "audio_english_192" with "audio_english_64" | |
| # If you want lower bitrate or lower resolution video, do a find/replace of "hvc_2160p_16800" with any of the following: | |
| # "hvc_2160p_11600" | |
| # "hvc_1440p_8100" | |
| # "hvc_1080p_5800" | |
| # "hvc_1080p_4500" | |
| # "hvc_720p_3400" |
This file contains hidden or 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
| import SwiftUI | |
| import PlaygroundSupport | |
| struct Content: View { | |
| @State var isExpanded = false | |
| @State var wifiEnabled = true | |
| @State var spacing: CGFloat = 12 | |
| var body: some View { | |
| VStack(spacing: self.spacing) { | |
| HStack(spacing: self.spacing) { |
This file contains hidden or 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
| func fontDescriptorWithHighLegibilityMonospacedFigures(for fontDescriptor: UIFontDescriptor) -> UIFontDescriptor { | |
| return fontDescriptor.addingAttributes( | |
| [ | |
| UIFontDescriptor.AttributeName.featureSettings: | |
| [ | |
| [ // High legibility 6 and 9 | |
| UIFontDescriptor.FeatureKey.featureIdentifier: kStylisticAlternativesType, | |
| UIFontDescriptor.FeatureKey.typeIdentifier: kStylisticAltOneOnSelector, | |
| ], | |
| [ // High legibility 4 |
This file contains hidden or 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
| import Foundation | |
| extension Measurement where UnitType: Dimension { | |
| func approximatelyConverted(to otherUnit: UnitType) -> Measurement<UnitType> { | |
| switch (unit, otherUnit) { | |
| case (UnitLength.meters, UnitLength.feet): | |
| return Measurement(value: value * 3, unit: otherUnit) | |
| case (UnitLength.feet, UnitLength.meters): | |
| return Measurement(value: value * 3 / 10, unit: otherUnit) | |
| case (UnitSpeed.knots, UnitSpeed.metersPerSecond): |
This file contains hidden or 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
| // | |
| // CAMediaTimingFunction.swift | |
| import UIKit | |
| extension CAMediaTimingFunction { | |
| static let linear = CAMediaTimingFunction(name: .linear) | |
| static let easeOut = CAMediaTimingFunction(name: .easeOut) |
This file contains hidden or 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
| import Foundation | |
| extension Locale { | |
| func localizedCurrencySymbol(forCurrencyCode currencyCode: String) -> String? { | |
| guard let languageCode = languageCode, let regionCode = regionCode else { return nil } | |
| /* | |
| Each currency can have a symbol ($, £, ¥), | |
| but those symbols may be shared with other currencies. | |
| For example, in Canadian and American locales, |