Skip to content

Commit

Permalink
[Feat/#5] AppselectButton - 버튼 UI구현
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoe0929 committed Jan 4, 2024
1 parent a16e3ba commit cb4d639
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
12 changes: 12 additions & 0 deletions HMH_iOS/HMH_iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
0B8A89BE2B369F7C00688BA6 /* E.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B8A89BD2B369F7C00688BA6 /* E.swift */; };
0B8A89C42B369FA000688BA6 /* F.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B8A89C32B369FA000688BA6 /* F.swift */; };
0B8A89C62B369FA800688BA6 /* H.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B8A89C52B369FA800688BA6 /* H.swift */; };
3666C84D2B45F41300564874 /* HMHAppSelectButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3666C84C2B45F41300564874 /* HMHAppSelectButtonView.swift */; };
3666C8552B45F47600564874 /* DeviceActivity.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3666C8542B45F47600564874 /* DeviceActivity.framework */; };
3666C8582B45F47600564874 /* DeviceActivityMonitorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3666C8572B45F47600564874 /* DeviceActivityMonitorExtension.swift */; };
3666C85D2B45F47600564874 /* DeviceMonitor.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 3666C8522B45F47600564874 /* DeviceMonitor.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
Expand Down Expand Up @@ -128,6 +129,7 @@
0B8A89BD2B369F7C00688BA6 /* E.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = E.swift; sourceTree = "<group>"; };
0B8A89C32B369FA000688BA6 /* F.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = F.swift; sourceTree = "<group>"; };
0B8A89C52B369FA800688BA6 /* H.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = H.swift; sourceTree = "<group>"; };
3666C84C2B45F41300564874 /* HMHAppSelectButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HMHAppSelectButtonView.swift; sourceTree = "<group>"; };
3666C8522B45F47600564874 /* DeviceMonitor.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = DeviceMonitor.appex; sourceTree = BUILT_PRODUCTS_DIR; };
3666C8542B45F47600564874 /* DeviceActivity.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DeviceActivity.framework; path = System/Library/Frameworks/DeviceActivity.framework; sourceTree = SDKROOT; };
3666C8572B45F47600564874 /* DeviceActivityMonitorExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeviceActivityMonitorExtension.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -393,6 +395,7 @@
0B8A89A52B369DD500688BA6 /* Common */ = {
isa = PBXGroup;
children = (
3666C8492B45F37900564874 /* SwiftUIView */,
0B8A89A62B369DDB00688BA6 /* UIComponets */,
);
path = Common;
Expand Down Expand Up @@ -449,6 +452,14 @@
path = Cells;
sourceTree = "<group>";
};
3666C8492B45F37900564874 /* SwiftUIView */ = {
isa = PBXGroup;
children = (
3666C84C2B45F41300564874 /* HMHAppSelectButtonView.swift */,
);
path = SwiftUIView;
sourceTree = "<group>";
};
3666C8532B45F47600564874 /* Frameworks */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -660,6 +671,7 @@
0B8A89C42B369FA000688BA6 /* F.swift in Sources */,
0B8A89B72B369F1100688BA6 /* C.swift in Sources */,
0B2C2D3B2B443BE90023CCFA /* Image.swift in Sources */,
3666C84D2B45F41300564874 /* HMHAppSelectButtonView.swift in Sources */,
0B8A89AD2B369E3B00688BA6 /* HomeCell.swift in Sources */,
0B8A89C62B369FA800688BA6 /* H.swift in Sources */,
36A3D9BE2B409BCC007EA272 /* Color.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//
// HMHAppSelectButtonView.swift
// HMH_iOS
//
// Created by 지희의 MAC on 1/4/24.
//

import SwiftUI
import UIKit
import FamilyControls

struct HMHAppSelectButtonView: View {

@EnvironmentObject var model: BlockingApplicationModel
@State var isPresented = false

var body: some View {
ZStack {
Color(uiColor: .clear)
RoundedRectangle(cornerRadius: 6)
.fill(Color(red: 0.24, green: 0.09, blue: 0.83))
Button(action: { isPresented.toggle() }) {
Text("앱 선택하기")
.font(Font.custom("Pretendard-SemiBold", size: 16.adjusted))
.foregroundColor(.white)
.frame(width: 336, height: 52)
.background(Color(uiColor: .bluePurpleButton))
}
.familyActivityPicker(isPresented: $isPresented, selection: $model.newSelection)
}
}

}

#Preview {
HMHAppSelectButtonView()
}

0 comments on commit cb4d639

Please sign in to comment.