├── LICENSE ├── README.md ├── images ├── output.png ├── reference.png ├── tweet.png └── xcode.png └── wwdc22.swiftpm ├── .swiftpm └── xcode │ ├── package.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── atrinh.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ └── atrinh.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── Assets.xcassets ├── AccentColor.colorset │ └── Contents.json ├── AppIcon.appiconset │ └── Contents.json └── Contents.json ├── ContentView.swift ├── MyApp.swift └── Package.swift /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 An Trinh 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WWDC22 2 | 3 | ![](https://img.shields.io/badge/Xcode-13.2.1+-blue.svg) 4 | 5 | The WWDC22 artwork in SwiftUI. 6 | 7 | 8 | 9 | ### Output 10 | 11 | ![](images/output.png) 12 | 13 | ### Reference image 14 | 15 | ![](images/reference.png) 16 | 17 | Source: https://developer.apple.com/wwdc22/ 18 | 19 | ### Project 20 | 21 | Open the `wwdc22.swiftpm` project using Xcode. 22 | 23 | ![](images/xcode.png) 24 | -------------------------------------------------------------------------------- /images/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atrinh0/wwdc22/f89fd3b547d38735fd56cfd88313d2fd6f281fcb/images/output.png -------------------------------------------------------------------------------- /images/reference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atrinh0/wwdc22/f89fd3b547d38735fd56cfd88313d2fd6f281fcb/images/reference.png -------------------------------------------------------------------------------- /images/tweet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atrinh0/wwdc22/f89fd3b547d38735fd56cfd88313d2fd6f281fcb/images/tweet.png -------------------------------------------------------------------------------- /images/xcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atrinh0/wwdc22/f89fd3b547d38735fd56cfd88313d2fd6f281fcb/images/xcode.png -------------------------------------------------------------------------------- /wwdc22.swiftpm/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /wwdc22.swiftpm/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /wwdc22.swiftpm/.swiftpm/xcode/package.xcworkspace/xcuserdata/atrinh.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atrinh0/wwdc22/f89fd3b547d38735fd56cfd88313d2fd6f281fcb/wwdc22.swiftpm/.swiftpm/xcode/package.xcworkspace/xcuserdata/atrinh.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /wwdc22.swiftpm/.swiftpm/xcode/xcuserdata/atrinh.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | wwdc2022.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 1 11 | 12 | wwdc22.xcscheme_^#shared#^_ 13 | 14 | orderHint 15 | 0 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | AppModule 21 | 22 | primary 23 | 24 | 25 | wwdc22 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /wwdc22.swiftpm/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /wwdc22.swiftpm/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /wwdc22.swiftpm/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /wwdc22.swiftpm/ContentView.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | struct ContentView: View { 4 | var body: some View { 5 | ZStack { 6 | gradientBackground 7 | gradientStrokeCircle 8 | topLeftCircleGlow 9 | swiftLogoBottomGlow 10 | swiftLogoTop 11 | lensFlare 12 | VStack { 13 | Text("WWDC22") 14 | .foregroundColor(.white) 15 | Spacer() 16 | Text("Call to code.") 17 | .foregroundColor(Color(red: 198/255, green: 225/255, blue: 230/255)) 18 | } 19 | .font(.title.weight(.bold)) 20 | .padding(.vertical, 100) 21 | } 22 | .edgesIgnoringSafeArea(.all) 23 | } 24 | 25 | private var gradientBackground: some View { 26 | LinearGradient(colors: [Color(red: 2/255, green: 10/255, blue: 30/255), .black], 27 | startPoint: .top, endPoint: .bottom) 28 | } 29 | 30 | private var gradientStrokeCircle: some View { 31 | AngularGradient(colors: [.orange, .yellow, .green, .teal, .blue, 32 | .blue, .indigo, .indigo, .black, .black, 33 | .black, .purple, .purple, .purple, .black, 34 | .black, .black, .black, .black, .orange].reversed(), 35 | center: .center, startAngle: .degrees(-90), endAngle: .degrees(270)) 36 | .mask { 37 | Circle() 38 | .stroke(lineWidth: 2) 39 | } 40 | .padding(25) 41 | } 42 | 43 | private var topLeftCircleGlow: some View { 44 | Circle() 45 | .foregroundColor(.blue) 46 | .padding(25) 47 | .blur(radius: 50) 48 | .opacity(0.5) 49 | .mask { 50 | AngularGradient(colors: [.clear, .white, .clear, .clear, .clear], 51 | center: .center, angle: .degrees(135)) 52 | .mask { 53 | ZStack { 54 | Rectangle() 55 | .foregroundColor(.white) 56 | Circle() 57 | .foregroundColor(.black) 58 | .padding(25) 59 | } 60 | .compositingGroup() 61 | .luminanceToAlpha() 62 | } 63 | } 64 | } 65 | 66 | private var swiftLogo: some View { 67 | Image(systemName: "swift") 68 | .resizable() 69 | .scaledToFit() 70 | .foregroundColor(.white) 71 | } 72 | 73 | private var swiftLogoBottomGlow: some View { 74 | swiftLogo 75 | .foregroundColor(.clear) 76 | .overlay { 77 | LinearGradient(colors: [Color(red: 149/255, green: 196/255, blue: 218/255), 78 | Color(red: 64/255, green: 116/255, blue: 163/255), 79 | .white, 80 | Color(red: 64/255, green: 116/255, blue: 163/255), 81 | Color(red: 64/255, green: 116/255, blue: 163/255), 82 | Color(red: 64/255, green: 116/255, blue: 163/255), 83 | Color(red: 64/255, green: 116/255, blue: 163/255), 84 | Color(red: 2/255, green: 5/255, blue: 20/255), 85 | Color(red: 2/255, green: 5/255, blue: 20/255)], 86 | startPoint: .bottomTrailing, endPoint: .topLeading) 87 | .mask { 88 | swiftLogo 89 | } 90 | } 91 | .padding(110) 92 | .offset(x: 1.5, y: 1.5) 93 | } 94 | 95 | private var swiftLogoTop: some View { 96 | swiftLogo 97 | .foregroundColor(.clear) 98 | .overlay { 99 | LinearGradient(colors: [Color(red: 2/255, green: 5/255, blue: 20/255), 100 | Color(red: 6/255, green: 20/255, blue: 35/255), 101 | Color(red: 64/255, green: 96/255, blue: 130/255)], 102 | startPoint: .bottomTrailing, endPoint: .topLeading) 103 | .mask { 104 | swiftLogo 105 | } 106 | } 107 | .padding(110) 108 | } 109 | 110 | private var lensFlare: some View { 111 | ZStack { 112 | Circle() 113 | .foregroundColor(.blue) 114 | .frame(width: 100, height: 100) 115 | .blur(radius: 50) 116 | .opacity(0.5) 117 | lensFlareLine 118 | lensFlareLine 119 | .scaleEffect(0.3) 120 | .rotationEffect(.degrees(-40)) 121 | .blur(radius: 1) 122 | lensFlareLine 123 | .scaleEffect(0.25) 124 | .rotationEffect(.degrees(85)) 125 | .blur(radius: 1) 126 | lensFlareLine 127 | .scaleEffect(0.2) 128 | .rotationEffect(.degrees(-10)) 129 | lensFlareLine 130 | .scaleEffect(0.15) 131 | .rotationEffect(.degrees(-50)) 132 | Circle() 133 | .foregroundColor(.white) 134 | .frame(width: 2, height: 2) 135 | .blur(radius: 1) 136 | .shadow(color: .white, radius: 2, x: 0, y: 0) 137 | .shadow(color: .white, radius: 2, x: 0, y: 0) 138 | .shadow(color: .white, radius: 2, x: 0, y: 0) 139 | } 140 | .offset(x: -82, y: -64) 141 | } 142 | 143 | private var lensFlareLine: some View { 144 | LinearGradient(stops: [.init(color: .clear, location: 0.49), 145 | .init(color: .blue, location: 0.5), 146 | .init(color: .clear, location: 0.51)], 147 | startPoint: .top, endPoint: .bottom) 148 | .mask { 149 | RadialGradient(colors: [.white, .white, .white, .clear, .clear], 150 | center: .center, startRadius: 0, endRadius: 250) 151 | } 152 | .blur(radius: 3) 153 | .opacity(0.25) 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /wwdc22.swiftpm/MyApp.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | @main 4 | struct MyApp: App { 5 | var body: some Scene { 6 | WindowGroup { 7 | ContentView() 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /wwdc22.swiftpm/Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version: 5.5 2 | 3 | // WARNING: 4 | // This file is automatically generated. 5 | // Do not edit it by hand because the contents will be replaced. 6 | 7 | import PackageDescription 8 | import AppleProductTypes 9 | 10 | let package = Package( 11 | name: "wwdc22", 12 | platforms: [ 13 | .iOS("15.2") 14 | ], 15 | products: [ 16 | .iOSApplication( 17 | name: "wwdc22", 18 | targets: ["AppModule"], 19 | bundleIdentifier: "com.atrinh.wwdc2022", 20 | teamIdentifier: "6DRH5697SN", 21 | displayVersion: "1", 22 | bundleVersion: "1", 23 | iconAssetName: "AppIcon", 24 | accentColorAssetName: "AccentColor", 25 | supportedDeviceFamilies: [ 26 | .pad, 27 | .phone 28 | ], 29 | supportedInterfaceOrientations: [ 30 | .portrait, 31 | .landscapeRight, 32 | .landscapeLeft, 33 | .portraitUpsideDown(.when(deviceFamilies: [.pad])) 34 | ] 35 | ) 36 | ], 37 | targets: [ 38 | .executableTarget( 39 | name: "AppModule", 40 | path: "." 41 | ) 42 | ] 43 | ) --------------------------------------------------------------------------------