Skip to content

Commit 17aa891

Browse files
committed
refactor(c12): remove heart icon and formate code
1 parent 75a551e commit 17aa891

File tree

8 files changed

+20
-212
lines changed

8 files changed

+20
-212
lines changed

p1-c12-🚕-side-menu-interaction/SideMenuInteraction/SideMenuInteraction.xcodeproj/project.pbxproj

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
isa = PBXProject;
108108
attributes = {
109109
LastSwiftUpdateCheck = 1100;
110-
LastUpgradeCheck = 1100;
110+
LastUpgradeCheck = 1210;
111111
ORGANIZATIONNAME = "Frad LEE";
112112
TargetAttributes = {
113113
CB68F31423161C2C00EC0F57 = {
@@ -198,6 +198,7 @@
198198
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
199199
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
200200
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
201+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
201202
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
202203
CLANG_WARN_STRICT_PROTOTYPES = YES;
203204
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -258,6 +259,7 @@
258259
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
259260
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
260261
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
262+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
261263
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
262264
CLANG_WARN_STRICT_PROTOTYPES = YES;
263265
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -293,7 +295,7 @@
293295
CODE_SIGN_ENTITLEMENTS = SideMenuInteraction/SideMenuInteraction.entitlements;
294296
CODE_SIGN_STYLE = Automatic;
295297
DEVELOPMENT_ASSET_PATHS = "SideMenuInteraction/Preview\\ Content";
296-
DEVELOPMENT_TEAM = 6494F8NQFF;
298+
DEVELOPMENT_TEAM = GTL29ANKNP;
297299
ENABLE_PREVIEWS = YES;
298300
INFOPLIST_FILE = SideMenuInteraction/Info.plist;
299301
LD_RUNPATH_SEARCH_PATHS = (
@@ -315,7 +317,7 @@
315317
CODE_SIGN_ENTITLEMENTS = SideMenuInteraction/SideMenuInteraction.entitlements;
316318
CODE_SIGN_STYLE = Automatic;
317319
DEVELOPMENT_ASSET_PATHS = "SideMenuInteraction/Preview\\ Content";
318-
DEVELOPMENT_TEAM = 6494F8NQFF;
320+
DEVELOPMENT_TEAM = GTL29ANKNP;
319321
ENABLE_PREVIEWS = YES;
320322
INFOPLIST_FILE = SideMenuInteraction/Info.plist;
321323
LD_RUNPATH_SEARCH_PATHS = (

p1-c12-🚕-side-menu-interaction/SideMenuInteraction/SideMenuInteraction/AppDelegate.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ import UIKit
1010

1111
@UIApplicationMain
1212
class AppDelegate: UIResponder, UIApplicationDelegate {
13-
14-
15-
1613
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
1714
// Override point for customization after application launch.
1815
return true
@@ -31,7 +28,4 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
3128
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
3229
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
3330
}
34-
35-
3631
}
37-
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"info" : {
3-
"version" : 1,
4-
"author" : "xcode"
3+
"author" : "xcode",
4+
"version" : 1
55
}
6-
}
6+
}

p1-c12-🚕-side-menu-interaction/SideMenuInteraction/SideMenuInteraction/Assets.xcassets/CustomSymbols/heart.symbolset/Contents.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

p1-c12-🚕-side-menu-interaction/SideMenuInteraction/SideMenuInteraction/Assets.xcassets/CustomSymbols/heart.symbolset/heart.svg

Lines changed: 0 additions & 160 deletions
This file was deleted.

p1-c12-🚕-side-menu-interaction/SideMenuInteraction/SideMenuInteraction/ContentView.swift

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import SwiftUI
1010

1111
struct ContentView: View {
1212
@State private var sideMenuActived: Bool = false
13-
13+
1414
var body: some View {
1515
ZStack {
1616
BackgroundView()
@@ -20,16 +20,13 @@ struct ContentView: View {
2020
.shadow(radius: sideMenuActived ? 32 : 0)
2121
VStack {
2222
HStack {
23-
Button(action: {self.sideMenuActived.toggle()}) {
23+
Button(action: { self.sideMenuActived.toggle() }) {
2424
Image(uiImage: menuListImage).accentColor(Color.white)
2525
.frame(width: 44, height: 44, alignment: .center)
2626
.scaleEffect(sideMenuActived ? 1.2 : 1)
2727
}.padding(.top, 64).padding(.leading, 32)
2828
Spacer()
2929
}
30-
// HStack {
31-
// Spacer()
32-
// }
3330
Spacer()
3431
}
3532
}
@@ -39,38 +36,33 @@ struct ContentView: View {
3936
VStack {
4037
Spacer()
4138
Text("a little work with 🚕")
42-
.foregroundColor(Color.black.opacity(0.5))
43-
.font(.system(size: 17, weight: .regular))
44-
.italic()
45-
.padding(16)
39+
.foregroundColor(Color.black.opacity(0.5))
40+
.font(.system(size: 17, weight: .regular))
41+
.italic()
42+
.padding(16)
4643
}
4744
}
48-
49-
5045
}
5146
}
5247

5348
struct BackgroundView: View {
5449
var body: some View {
55-
ZStack {
56-
Spacer()
57-
.background(Color(red: 232/255, green: 237/255, blue: 233/255)).edgesIgnoringSafeArea(.all)
58-
HStack {
59-
// Image(uiImage: heartImage)
60-
Spacer()
61-
}
62-
}
50+
Spacer()
51+
.background(Color(red: 232 / 255, green: 237 / 255, blue: 233 / 255)).edgesIgnoringSafeArea(.all)
6352
}
6453
}
6554

6655
struct ContentView_Previews: PreviewProvider {
6756
static var previews: some View {
6857
ContentView()
58+
.previewLayout(.sizeThatFits)
59+
6960
}
7061
}
7162

7263
struct BackgroundView_Previews: PreviewProvider {
7364
static var previews: some View {
7465
BackgroundView()
66+
.previewLayout(.sizeThatFits)
7567
}
7668
}

p1-c12-🚕-side-menu-interaction/SideMenuInteraction/SideMenuInteraction/CustomSymbols.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,3 @@ import UIKit
1111

1212
let menuListImage: UIImage = UIImage(named: "menu.list")!
1313
.withConfiguration(UIImage.SymbolConfiguration(pointSize: 32, weight: .regular, scale: .medium))
14-
15-
let heartImage: UIImage = UIImage(named: "heart")!
16-
.withConfiguration(UIImage.SymbolConfiguration(pointSize: 32, weight: .regular, scale: .medium))

p1-c12-🚕-side-menu-interaction/SideMenuInteraction/SideMenuInteraction/SceneDelegate.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@
66
// Copyright © 2019 Frad LEE. All rights reserved.
77
//
88

9-
import UIKit
109
import SwiftUI
10+
import UIKit
1111

1212
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
13-
1413
var window: UIWindow?
1514

16-
1715
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
1816
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
1917
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
@@ -55,7 +53,4 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
5553
// Use this method to save data, release shared resources, and store enough scene-specific state information
5654
// to restore the scene back to its current state.
5755
}
58-
59-
6056
}
61-

0 commit comments

Comments
 (0)