-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9244f0f
commit 157a45e
Showing
11 changed files
with
340 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// | ||
// BasePaddingLabel.swift | ||
// HousLab_iOS | ||
// | ||
// Created by 이의진 on 2022/07/09. | ||
// | ||
|
||
import UIKit | ||
|
||
class BasePaddingLabel: UILabel { | ||
private var padding = UIEdgeInsets(top: 16.0, left: 16.0, bottom: 16.0, right: 16.0) | ||
|
||
convenience init(padding: UIEdgeInsets) { | ||
self.init() | ||
self.padding = padding | ||
} | ||
|
||
override func drawText(in rect: CGRect) { | ||
super.drawText(in: rect.inset(by: padding)) | ||
} | ||
|
||
override var intrinsicContentSize: CGSize { | ||
var contentSize = super.intrinsicContentSize | ||
contentSize.height += padding.top + padding.bottom | ||
contentSize.width += padding.left + padding.right | ||
|
||
return contentSize | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
HousLab_iOS/HousLab_iOS/EuiJin/ProfileBedgeCollectionViewCell.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,54 @@ | ||
// | ||
// ProfileBedgeCollectionViewCell.swift | ||
// HousLab_iOS | ||
// | ||
// Created by 이의진 on 2022/07/09. | ||
// | ||
|
||
import UIKit | ||
import SwiftUI | ||
|
||
class ProfileBedgeCollectionViewCell: UICollectionViewCell { | ||
static var identifier = "ProfileBedgeCollectionViewCell" | ||
|
||
|
||
//MARK: - Properties | ||
|
||
let tempLabel = UILabel().then{ | ||
$0.text = "Temp" | ||
} | ||
|
||
//MARK: - Override Methods | ||
|
||
override init(frame: CGRect){ | ||
super.init(frame: frame) | ||
configureUI() | ||
setConstraints() | ||
} | ||
|
||
required init?(coder: NSCoder){ | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
//MARK: - Private Methods | ||
|
||
private func configureUI(){ | ||
self.backgroundColor = .purple | ||
[tempLabel].forEach {self.addSubview($0)} | ||
} | ||
|
||
private func setConstraints(){ | ||
tempLabel.snp.makeConstraints{make in | ||
make.top.equalTo(self.safeAreaLayoutGuide) | ||
make.centerY.equalToSuperview() | ||
} | ||
} | ||
|
||
|
||
} | ||
|
||
struct VCPreView4:PreviewProvider { | ||
static var previews: some View { | ||
ProfileViewController().toPreview() | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
HousLab_iOS/HousLab_iOS/EuiJin/ProfileGraphCollectionViewCell.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,55 @@ | ||
// | ||
// DemoCell.swift | ||
// HousLab_iOS | ||
// | ||
// Created by 이의진 on 2022/07/07. | ||
// | ||
|
||
import UIKit | ||
import SwiftUI | ||
|
||
class ProfileGraphbCollectionViewCell: UICollectionViewCell { | ||
|
||
static var identifier = "ProfileGraphCollectionViewCell" | ||
|
||
|
||
//MARK: - Properties | ||
|
||
let tempLabel = UILabel().then{ | ||
$0.text = "Temp" | ||
} | ||
|
||
//MARK: - Override Methods | ||
|
||
override init(frame: CGRect){ | ||
super.init(frame: frame) | ||
configureUI() | ||
setConstraints() | ||
} | ||
|
||
required init?(coder: NSCoder){ | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
//MARK: - Private Methods | ||
|
||
private func configureUI(){ | ||
self.backgroundColor = .blue | ||
[tempLabel].forEach {self.addSubview($0)} | ||
} | ||
|
||
private func setConstraints(){ | ||
tempLabel.snp.makeConstraints{make in | ||
make.top.equalTo(self.safeAreaLayoutGuide) | ||
make.centerY.equalToSuperview() | ||
} | ||
} | ||
|
||
|
||
} | ||
|
||
struct VCPreView3:PreviewProvider { | ||
static var previews: some View { | ||
ProfileViewController().toPreview() | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// | ||
// ProfileTopView.swift | ||
// HousLab_iOS | ||
// | ||
// Created by 이의진 on 2022/07/08. | ||
// | ||
|
||
import UIKit | ||
import SwiftUI | ||
|
||
class ProfileTopView: EuiJinBaseView { | ||
|
||
//MARK: - Properties | ||
|
||
var appNameLabel = UILabel().then{ | ||
$0.text = "Hous - ME" | ||
$0.textColor = .black | ||
$0.font = UIFont.boldSystemFont(ofSize: 26) | ||
} | ||
|
||
var editProfileButton = UIButton().then{ | ||
$0.setImage(UIImage(named: "edit"), for: .normal) | ||
} | ||
|
||
var settingProfileButton = UIButton().then{ | ||
$0.setImage(UIImage(named: "edit"), for: .normal) | ||
} | ||
|
||
override func setUp(){ | ||
|
||
} | ||
|
||
override func configureUI() { | ||
self.backgroundColor = .white | ||
[appNameLabel,editProfileButton, settingProfileButton].forEach {self.addSubview($0)} | ||
} | ||
|
||
override func setConstraints() { | ||
appNameLabel.snp.makeConstraints { make in | ||
make.leading.equalToSuperview().offset(24) | ||
make.centerY.equalToSuperview() | ||
} | ||
|
||
editProfileButton.snp.makeConstraints {make in | ||
make.trailing.equalToSuperview().offset(-60) | ||
make.centerY.equalToSuperview() | ||
make.width.height.equalTo(24) | ||
} | ||
|
||
settingProfileButton.snp.makeConstraints {make in | ||
make.trailing.equalToSuperview().offset(-24) | ||
make.centerY.equalToSuperview() | ||
make.width.height.equalTo(24) | ||
} | ||
} | ||
|
||
|
||
|
||
} | ||
|
||
struct VCPreView1:PreviewProvider { | ||
static var previews: some View { | ||
ProfileViewController().toPreview() | ||
} | ||
} | ||
|
||
// | ||
//} | ||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.