-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Feat [#29] 나의 챌린지 뷰 Footer Button 완성
- Loading branch information
Showing
13 changed files
with
219 additions
and
73 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
23 changes: 23 additions & 0 deletions
23
HMH_iOS/HMH_iOS/Global/Resources/Assets.xcassets/Minus_XL.imageset/Contents.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "Minus_XL.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+240 Bytes
HMH_iOS/HMH_iOS/Global/Resources/Assets.xcassets/Minus_XL.imageset/Minus_XL.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+324 Bytes
HMH_iOS/HMH_iOS/Global/Resources/Assets.xcassets/Minus_XL.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+480 Bytes
HMH_iOS/HMH_iOS/Global/Resources/Assets.xcassets/Minus_XL.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
57 changes: 57 additions & 0 deletions
57
.../HMH_iOS/Presentation/Challenge/Cells/HeaderFooterView/AppAddCollectionReusableView.swift
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// | ||
// AppAddCollectionReusableView.swift | ||
// HMH_iOS | ||
// | ||
// Created by 지희의 MAC on 1/8/24. | ||
// | ||
|
||
import UIKit | ||
import SwiftUI | ||
|
||
import SnapKit | ||
import Then | ||
|
||
class AppAddCollectionReusableView: UICollectionReusableView { | ||
|
||
static let identifier = "AppAddCollectionReusableView" | ||
var hostingController: UIHostingController<AppAddButtonView>? | ||
|
||
private lazy var contentViewController : UIHostingController<some View> = { | ||
let model = BlockingApplicationModel.shared | ||
let hostingController = UIHostingController( | ||
rootView: AppAddButtonView() | ||
.environmentObject(model) | ||
) | ||
return hostingController | ||
}() | ||
|
||
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
setUI() | ||
configureView() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
private func setUI(){ | ||
setHierarchy() | ||
setConstraints() | ||
} | ||
|
||
private func setHierarchy() { | ||
self.addSubviews(contentViewController.view) | ||
} | ||
|
||
private func setConstraints() { | ||
contentViewController.view.snp.makeConstraints { | ||
$0.verticalEdges.equalToSuperview() | ||
$0.horizontalEdges.equalToSuperview().inset(20) | ||
} | ||
} | ||
|
||
private func configureView() { | ||
contentViewController.view.backgroundColor = .clear | ||
} | ||
} |
This file contains 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
32 changes: 32 additions & 0 deletions
32
HMH_iOS/HMH_iOS/Presentation/Challenge/SwiftUIView/AppAddButtonView.swift
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// AppAddButtonView.swift | ||
// HMH_iOS | ||
// | ||
// Created by 지희의 MAC on 1/8/24. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct AppAddButtonView: View { | ||
|
||
@EnvironmentObject var model: BlockingApplicationModel | ||
@State var isPresented = false | ||
|
||
var body: some View { | ||
ZStack { | ||
Color(uiColor: .clear) | ||
RoundedRectangle(cornerRadius: 6) | ||
.fill(Color(uiColor: .gray8)) | ||
Button(action: { isPresented.toggle() }) { | ||
Image(uiImage: ImageLiterals.Challenge.icPlus) | ||
} | ||
.frame(width: 335, height: 68) | ||
.familyActivityPicker(isPresented: $isPresented, selection: $model.newSelection) | ||
} | ||
.background(Color(.clear)) | ||
} | ||
} | ||
|
||
#Preview { | ||
AppAddButtonView() | ||
} |
This file contains 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
Oops, something went wrong.