diff --git a/.DS_Store b/.DS_Store index 62cf7e0..2a1832c 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/Better-me-iOS.xcodeproj/project.pbxproj b/Better-me-iOS.xcodeproj/project.pbxproj index 0f11b14..4b48cb5 100644 --- a/Better-me-iOS.xcodeproj/project.pbxproj +++ b/Better-me-iOS.xcodeproj/project.pbxproj @@ -20,6 +20,9 @@ 28EFD48F298A79EF0092E210 /* GoodHabitTipsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28EFD48E298A79EF0092E210 /* GoodHabitTipsViewController.swift */; }; 28EFD496298AA2FC0092E210 /* PushAlertViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28EFD495298AA2FC0092E210 /* PushAlertViewController.swift */; }; 28EFD498298AAB620092E210 /* AlertTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28EFD497298AAB620092E210 /* AlertTableViewCell.swift */; }; + 5E31F9BA299CC49100EB1297 /* AwardMainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E31F9B9299CC49100EB1297 /* AwardMainViewController.swift */; }; + 5E31F9BC299D117900EB1297 /* AwardImageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E31F9BB299D117900EB1297 /* AwardImageViewController.swift */; }; + 5E31F9BE299D607700EB1297 /* AwardBadHabitImageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E31F9BD299D607700EB1297 /* AwardBadHabitImageViewController.swift */; }; BE26CD08297805A900E97A05 /* AlertViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE26CD07297805A900E97A05 /* AlertViewController.swift */; }; BE532E742975A41800DDA6EA /* BadHabitDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE532E732975A41800DDA6EA /* BadHabitDetailViewController.swift */; }; BE5F4EC2296D8F640064A93C /* RemoveBadHabitViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE5F4EC1296D8F640064A93C /* RemoveBadHabitViewController.swift */; }; @@ -59,6 +62,9 @@ 28EFD493298A9FD50092E210 /* second.apn */ = {isa = PBXFileReference; lastKnownFileType = text; path = second.apn; sourceTree = ""; }; 28EFD495298AA2FC0092E210 /* PushAlertViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PushAlertViewController.swift; sourceTree = ""; }; 28EFD497298AAB620092E210 /* AlertTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertTableViewCell.swift; sourceTree = ""; }; + 5E31F9B9299CC49100EB1297 /* AwardMainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AwardMainViewController.swift; sourceTree = ""; }; + 5E31F9BB299D117900EB1297 /* AwardImageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AwardImageViewController.swift; sourceTree = ""; }; + 5E31F9BD299D607700EB1297 /* AwardBadHabitImageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AwardBadHabitImageViewController.swift; sourceTree = ""; }; BE26CD07297805A900E97A05 /* AlertViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertViewController.swift; sourceTree = ""; }; BE532E732975A41800DDA6EA /* BadHabitDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BadHabitDetailViewController.swift; sourceTree = ""; }; BE5F4EC1296D8F640064A93C /* RemoveBadHabitViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoveBadHabitViewController.swift; sourceTree = ""; }; @@ -158,6 +164,9 @@ BE26CD07297805A900E97A05 /* AlertViewController.swift */, BE82D332298D191A003EFE44 /* EditViewController.swift */, 280F5E542983B23A000A30B3 /* MyPage */, + 5E31F9B9299CC49100EB1297 /* AwardMainViewController.swift */, + 5E31F9BB299D117900EB1297 /* AwardImageViewController.swift */, + 5E31F9BD299D607700EB1297 /* AwardBadHabitImageViewController.swift */, ); path = "Better-me-iOS"; sourceTree = ""; @@ -237,12 +246,15 @@ BE5F4EC6296E7CC90064A93C /* SearchFriendViewController.swift in Sources */, 28BFE250298B83A700176731 /* GoodTipsCell.swift in Sources */, 280F5E5E2983B25F000A30B3 /* PWEditController.swift in Sources */, + 5E31F9BE299D607700EB1297 /* AwardBadHabitImageViewController.swift in Sources */, 280F5E5B2983B25F000A30B3 /* MyPageViewController.swift in Sources */, 280F5E5C2983B25F000A30B3 /* MyPageCell.swift in Sources */, BEF940C029753F8500D0F1FD /* GoodHabitDetailViewController.swift in Sources */, BECC4B4D296C3E1F0037807F /* AddGoodHabitViewController.swift in Sources */, 280F5E5D2983B25F000A30B3 /* ProfileEditController.swift in Sources */, 28EFD48D298A3ABE0092E210 /* WithdrawalViewController.swift in Sources */, + 5E31F9BC299D117900EB1297 /* AwardImageViewController.swift in Sources */, + 5E31F9BA299CC49100EB1297 /* AwardMainViewController.swift in Sources */, BECC4B3D296C3AB60037807F /* HomeViewController.swift in Sources */, BE26CD08297805A900E97A05 /* AlertViewController.swift in Sources */, BECC4B39296C3AB60037807F /* AppDelegate.swift in Sources */, diff --git a/Better-me-iOS.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Better-me-iOS.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..1777284 --- /dev/null +++ b/Better-me-iOS.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,23 @@ +{ + "pins" : [ + { + "identity" : "alamofire", + "kind" : "remoteSourceControl", + "location" : "https://github.com/Alamofire/Alamofire.git", + "state" : { + "revision" : "78424be314842833c04bc3bef5b72e85fff99204", + "version" : "5.6.4" + } + }, + { + "identity" : "popupview", + "kind" : "remoteSourceControl", + "location" : "https://github.com/exyte/PopupView.git", + "state" : { + "revision" : "ee306aede532d941c05ff8c63b3b0f3b8cc208cc", + "version" : "2.0.1" + } + } + ], + "version" : 2 +} diff --git a/Better-me-iOS/Assets.xcassets/AwardAward.imageset/AwardAward.png b/Better-me-iOS/Assets.xcassets/AwardAward.imageset/AwardAward.png new file mode 100644 index 0000000..ee45cf7 Binary files /dev/null and b/Better-me-iOS/Assets.xcassets/AwardAward.imageset/AwardAward.png differ diff --git a/Better-me-iOS/Assets.xcassets/AwardAward.imageset/Contents.json b/Better-me-iOS/Assets.xcassets/AwardAward.imageset/Contents.json new file mode 100644 index 0000000..cbd5ebd --- /dev/null +++ b/Better-me-iOS/Assets.xcassets/AwardAward.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "AwardAward.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Better-me-iOS/Assets.xcassets/AwardBorderimg.imageset/AwardBorderimg.png b/Better-me-iOS/Assets.xcassets/AwardBorderimg.imageset/AwardBorderimg.png new file mode 100644 index 0000000..873c603 Binary files /dev/null and b/Better-me-iOS/Assets.xcassets/AwardBorderimg.imageset/AwardBorderimg.png differ diff --git a/Better-me-iOS/Assets.xcassets/AwardBorderimg.imageset/Contents.json b/Better-me-iOS/Assets.xcassets/AwardBorderimg.imageset/Contents.json new file mode 100644 index 0000000..7e46abc --- /dev/null +++ b/Better-me-iOS/Assets.xcassets/AwardBorderimg.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "AwardBorderimg.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Better-me-iOS/Assets.xcassets/AwardEx_1.imageset/AwardEx_1.png b/Better-me-iOS/Assets.xcassets/AwardEx_1.imageset/AwardEx_1.png new file mode 100644 index 0000000..ee45cf7 Binary files /dev/null and b/Better-me-iOS/Assets.xcassets/AwardEx_1.imageset/AwardEx_1.png differ diff --git a/Better-me-iOS/Assets.xcassets/AwardEx_1.imageset/Contents.json b/Better-me-iOS/Assets.xcassets/AwardEx_1.imageset/Contents.json new file mode 100644 index 0000000..2446f3d --- /dev/null +++ b/Better-me-iOS/Assets.xcassets/AwardEx_1.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "AwardEx_1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Better-me-iOS/Assets.xcassets/AwardEx_2.imageset/AwardEx_2.png b/Better-me-iOS/Assets.xcassets/AwardEx_2.imageset/AwardEx_2.png new file mode 100644 index 0000000..ee45cf7 Binary files /dev/null and b/Better-me-iOS/Assets.xcassets/AwardEx_2.imageset/AwardEx_2.png differ diff --git a/Better-me-iOS/Assets.xcassets/AwardEx_2.imageset/Contents.json b/Better-me-iOS/Assets.xcassets/AwardEx_2.imageset/Contents.json new file mode 100644 index 0000000..9ebb2b5 --- /dev/null +++ b/Better-me-iOS/Assets.xcassets/AwardEx_2.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "AwardEx_2.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Better-me-iOS/Assets.xcassets/AwardLine.imageset/AwardLine.png b/Better-me-iOS/Assets.xcassets/AwardLine.imageset/AwardLine.png new file mode 100644 index 0000000..0862895 Binary files /dev/null and b/Better-me-iOS/Assets.xcassets/AwardLine.imageset/AwardLine.png differ diff --git a/Better-me-iOS/Assets.xcassets/AwardLine.imageset/Contents.json b/Better-me-iOS/Assets.xcassets/AwardLine.imageset/Contents.json new file mode 100644 index 0000000..39ebff6 --- /dev/null +++ b/Better-me-iOS/Assets.xcassets/AwardLine.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "AwardLine.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Better-me-iOS/Assets.xcassets/award_Award.imageset/Contents.json b/Better-me-iOS/Assets.xcassets/award_Award.imageset/Contents.json new file mode 100644 index 0000000..923b723 --- /dev/null +++ b/Better-me-iOS/Assets.xcassets/award_Award.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "award_Award.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Better-me-iOS/Assets.xcassets/award_Award.imageset/award_Award.png b/Better-me-iOS/Assets.xcassets/award_Award.imageset/award_Award.png new file mode 100644 index 0000000..d1ced86 Binary files /dev/null and b/Better-me-iOS/Assets.xcassets/award_Award.imageset/award_Award.png differ diff --git a/Better-me-iOS/Assets.xcassets/award_ProfileBorder.imageset/Contents.json b/Better-me-iOS/Assets.xcassets/award_ProfileBorder.imageset/Contents.json new file mode 100644 index 0000000..d042947 --- /dev/null +++ b/Better-me-iOS/Assets.xcassets/award_ProfileBorder.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "award_ProfileBorder.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Better-me-iOS/Assets.xcassets/award_ProfileBorder.imageset/award_ProfileBorder.png b/Better-me-iOS/Assets.xcassets/award_ProfileBorder.imageset/award_ProfileBorder.png new file mode 100644 index 0000000..b8a3185 Binary files /dev/null and b/Better-me-iOS/Assets.xcassets/award_ProfileBorder.imageset/award_ProfileBorder.png differ diff --git a/Better-me-iOS/Assets.xcassets/award_WaterMark.imageset/Contents.json b/Better-me-iOS/Assets.xcassets/award_WaterMark.imageset/Contents.json new file mode 100644 index 0000000..be42634 --- /dev/null +++ b/Better-me-iOS/Assets.xcassets/award_WaterMark.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "award_WaterMark.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Better-me-iOS/Assets.xcassets/award_WaterMark.imageset/award_WaterMark.png b/Better-me-iOS/Assets.xcassets/award_WaterMark.imageset/award_WaterMark.png new file mode 100644 index 0000000..d8f587f Binary files /dev/null and b/Better-me-iOS/Assets.xcassets/award_WaterMark.imageset/award_WaterMark.png differ diff --git a/Better-me-iOS/Assets.xcassets/award_bettermeMark.imageset/Contents.json b/Better-me-iOS/Assets.xcassets/award_bettermeMark.imageset/Contents.json new file mode 100644 index 0000000..cea1022 --- /dev/null +++ b/Better-me-iOS/Assets.xcassets/award_bettermeMark.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "award_bettermeMark.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Better-me-iOS/Assets.xcassets/award_bettermeMark.imageset/award_bettermeMark.png b/Better-me-iOS/Assets.xcassets/award_bettermeMark.imageset/award_bettermeMark.png new file mode 100644 index 0000000..94144a1 Binary files /dev/null and b/Better-me-iOS/Assets.xcassets/award_bettermeMark.imageset/award_bettermeMark.png differ diff --git a/Better-me-iOS/AwardBadHabitImageViewController.swift b/Better-me-iOS/AwardBadHabitImageViewController.swift new file mode 100644 index 0000000..289e7be --- /dev/null +++ b/Better-me-iOS/AwardBadHabitImageViewController.swift @@ -0,0 +1,83 @@ +// +// AwardImageViewController.swift +// Better-me-iOS +// +// Created by 염승범 on 2023/02/15. +// + +import UIKit + +class AwardBadHabitImageViewController:UIViewController{ + // MARK: @IBOutlet + @IBOutlet weak var AwardImg: UIImageView! + @IBOutlet weak var AwardNameLabel: UILabel! + @IBOutlet weak var SecondTitleLabel: UILabel! + @IBOutlet weak var NameLabel: UILabel! + + @IBOutlet weak var AwardInfoLabel: UILabel! + @IBOutlet weak var SecAwardNameLabel: UILabel! + @IBOutlet weak var DateLabel: UILabel! + + @IBOutlet weak var NowDateLabel: UILabel! + @IBOutlet weak var BetterMeLabel: UILabel! + + + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + configureAwardNameViewUI() + + configureAwardImgViewUI() + + } + func parentDo(Entity:UILabel, Width:CGFloat, Height:CGFloat, X:CGFloat , Y:CGFloat )->Void{ + let parent = Entity + view.addSubview(Entity) + //view.bringSubviewToFront(parent) + Entity.translatesAutoresizingMaskIntoConstraints = false + Entity.widthAnchor.constraint(equalToConstant: Width).isActive = true + Entity.heightAnchor.constraint(equalToConstant: Height).isActive = true + Entity.leadingAnchor.constraint(equalTo: parent.leadingAnchor, constant: X).isActive = true + Entity.topAnchor.constraint(equalTo: parent.topAnchor, constant: Y).isActive = true + + + } + func configureAwardImgViewUI(){ + let image0 = self.AwardImg + let layer0 = CALayer() + layer0.contents = image0 + layer0.transform = CATransform3DMakeAffineTransform(CGAffineTransform(a: 1, b: 0, c: 0, d: 1, tx: 0, ty: 0)) + layer0.bounds = view.bounds + layer0.position = view.center + view.layer.addSublayer(layer0) + } + func configureAwardNameViewUI(){ + view.backgroundColor = .white + + AwardNameLabel.font = UIFont(name: "AppleSDGothicNeo-SemiBold", size: 13) + SecondTitleLabel.font = UIFont(name: "AppleSDGothicNeo-SemiBold", size: 13) + NameLabel.font = UIFont(name: "AppleSDGothicNeo-SemiBold", size: 13) + AwardInfoLabel.font = UIFont(name: "AppleSDGothicNeo-SemiBold", size: 13) + SecAwardNameLabel.font = UIFont(name: "AppleSDGothicNeo-SemiBold", size: 13) + DateLabel.font = UIFont(name: "AppleSDGothicNeo-SemiBold", size: 13) + NowDateLabel.font = UIFont(name: "AppleSDGothicNeo-SemiBold", size: 13) + BetterMeLabel.font = UIFont(name: "AppleSDGothicNeo-SemiBold", size: 13) + AwardInfoLabel.numberOfLines = 3 + + + let paragraphStyle = NSMutableParagraphStyle() + + paragraphStyle.lineHeightMultiple = 1.17 + AwardNameLabel.attributedText = NSMutableAttributedString(string: "상장명 : 마 니 서마터폰 중독이다📱 ", attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle]) + SecondTitleLabel.attributedText = NSMutableAttributedString(string: "부문 : 나쁜 습관 없애기", attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle]) + NameLabel.attributedText = NSMutableAttributedString(string: "이름 : 김유니", attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle]) + AwardInfoLabel.attributedText = NSMutableAttributedString(string: "위 사람은 긴 기간동안 성실하게 정진하여\n다음과 같은 나쁜 습관을 제거하였으므로\n이 상장을 수여하여 칭찬합니다.", attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle]) + SecAwardNameLabel.attributedText = NSMutableAttributedString(string: "[ 스마트폰 사용시간 하루 4시간 안넘기기 ]", attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle]) + DateLabel.attributedText = NSMutableAttributedString(string: "2022.01.01 ~ 2022.01.22", attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle]) + NowDateLabel.attributedText = NSMutableAttributedString(string: "2023.02.16", attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle]) + BetterMeLabel.attributedText = NSMutableAttributedString(string: "Better me", attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle]) + //parentDo(Entity: AwardNameLabel, Width: 174, Height: 18, X: 56, Y: 248) + + } +} diff --git a/Better-me-iOS/AwardImageViewController.swift b/Better-me-iOS/AwardImageViewController.swift new file mode 100644 index 0000000..01ccae5 --- /dev/null +++ b/Better-me-iOS/AwardImageViewController.swift @@ -0,0 +1,83 @@ +// +// AwardImageViewController.swift +// Better-me-iOS +// +// Created by 염승범 on 2023/02/15. +// + +import UIKit + +class AwardImageViewController:UIViewController{ + // MARK: @IBOutlet + @IBOutlet weak var AwardImg: UIImageView! + @IBOutlet weak var AwardNameLabel: UILabel! + @IBOutlet weak var SecondTitleLabel: UILabel! + @IBOutlet weak var NameLabel: UILabel! + + @IBOutlet weak var AwardInfoLabel: UILabel! + @IBOutlet weak var SecAwardNameLabel: UILabel! + @IBOutlet weak var DateLabel: UILabel! + + @IBOutlet weak var NowDateLabel: UILabel! + @IBOutlet weak var BetterMeLabel: UILabel! + + + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + configureAwardNameViewUI() + + configureAwardImgViewUI() + + } + func parentDo(Entity:UILabel, Width:CGFloat, Height:CGFloat, X:CGFloat , Y:CGFloat )->Void{ + let parent = Entity + view.addSubview(Entity) + //view.bringSubviewToFront(parent) + Entity.translatesAutoresizingMaskIntoConstraints = false + Entity.widthAnchor.constraint(equalToConstant: Width).isActive = true + Entity.heightAnchor.constraint(equalToConstant: Height).isActive = true + Entity.leadingAnchor.constraint(equalTo: parent.leadingAnchor, constant: X).isActive = true + Entity.topAnchor.constraint(equalTo: parent.topAnchor, constant: Y).isActive = true + + + } + func configureAwardImgViewUI(){ + let image0 = self.AwardImg + let layer0 = CALayer() + layer0.contents = image0 + layer0.transform = CATransform3DMakeAffineTransform(CGAffineTransform(a: 1, b: 0, c: 0, d: 1, tx: 0, ty: 0)) + layer0.bounds = view.bounds + layer0.position = view.center + view.layer.addSublayer(layer0) + } + func configureAwardNameViewUI(){ + view.backgroundColor = .white + + AwardNameLabel.font = UIFont(name: "AppleSDGothicNeo-SemiBold", size: 13) + SecondTitleLabel.font = UIFont(name: "AppleSDGothicNeo-SemiBold", size: 13) + NameLabel.font = UIFont(name: "AppleSDGothicNeo-SemiBold", size: 13) + AwardInfoLabel.font = UIFont(name: "AppleSDGothicNeo-SemiBold", size: 13) + SecAwardNameLabel.font = UIFont(name: "AppleSDGothicNeo-SemiBold", size: 13) + DateLabel.font = UIFont(name: "AppleSDGothicNeo-SemiBold", size: 13) + NowDateLabel.font = UIFont(name: "AppleSDGothicNeo-SemiBold", size: 13) + BetterMeLabel.font = UIFont(name: "AppleSDGothicNeo-SemiBold", size: 13) + AwardInfoLabel.numberOfLines = 3 + + + let paragraphStyle = NSMutableParagraphStyle() + + paragraphStyle.lineHeightMultiple = 1.17 + AwardNameLabel.attributedText = NSMutableAttributedString(string: "상장명 : 일어나자마자 이불개기😎 ", attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle]) + SecondTitleLabel.attributedText = NSMutableAttributedString(string: "부문 : 좋은 습관 만들기", attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle]) + NameLabel.attributedText = NSMutableAttributedString(string: "이름 : 김유니", attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle]) + AwardInfoLabel.attributedText = NSMutableAttributedString(string: "위 사람은 긴 기간동안 성실하게 정진하여\n다음과 같은 훌륭한 습관을 형성하였으므로\n이 상장을 수여하여 칭찬합니다.", attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle]) + SecAwardNameLabel.attributedText = NSMutableAttributedString(string: "[ 일어나자마자 이불개기 ]", attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle]) + DateLabel.attributedText = NSMutableAttributedString(string: "2022.01.01 ~ 2022.01.22", attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle]) + NowDateLabel.attributedText = NSMutableAttributedString(string: "2023.02.16", attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle]) + BetterMeLabel.attributedText = NSMutableAttributedString(string: "Better me", attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle]) + //parentDo(Entity: AwardNameLabel, Width: 174, Height: 18, X: 56, Y: 248) + + } +} diff --git a/Better-me-iOS/AwardMainViewController.swift b/Better-me-iOS/AwardMainViewController.swift new file mode 100644 index 0000000..2e474c3 --- /dev/null +++ b/Better-me-iOS/AwardMainViewController.swift @@ -0,0 +1,84 @@ +// +// AwardViewController.swift +// Better-me-iOS +// +// Created by 염승범 on 2023/01/31. +// + +import UIKit + +class AwardViewController:UIViewController{ + + // MARK: IBOutlet + @IBOutlet weak var HeadLabel: UILabel! + @IBOutlet weak var OneLinerLabel: UILabel! + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + configureHeadLabelViewUI() + configureOneLinerViewUI() + + } + + func configureHeadLabelViewUI(){ + view.backgroundColor = .white + //self.HeadLabel.text = "김유니 님은 17개의 상장을 받으셨어요!" + self.HeadLabel.font = UIFont(name: "AppleSDGothicNeo-Bold", size: 16) + self.HeadLabel.numberOfLines = 2 + self.HeadLabel.lineBreakMode = .byWordWrapping + + let paragraphStyle = NSMutableParagraphStyle() + + paragraphStyle.lineHeightMultiple = 1.33 + + let attrString = NSMutableAttributedString(string: HeadLabel.text!) + self.HeadLabel.attributedText = attrString + + self.HeadLabel.attributedText = NSMutableAttributedString(string: "김유니 님은\n2개의 상장을 받으셨어요!", attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle]) + + let parent = self.HeadLabel! + + view.addSubview(HeadLabel) + + HeadLabel.translatesAutoresizingMaskIntoConstraints = false + + HeadLabel.widthAnchor.constraint(equalToConstant: 166).isActive = true + + HeadLabel.heightAnchor.constraint(equalToConstant: 55).isActive = true + + HeadLabel.leadingAnchor.constraint(equalTo: parent.leadingAnchor, constant: 22).isActive = true + + HeadLabel.topAnchor.constraint(equalTo: parent.topAnchor, constant: 61).isActive = true + } + func configureOneLinerViewUI(){ + view.backgroundColor = .white + + + self.OneLinerLabel.textColor = UIColor(red: 0.984, green: 0.078, blue: 0, alpha: 1) + + self.OneLinerLabel.font = UIFont(name: "AppleSDGothicNeo-SemiBold", size: 15) + + let paragraphStyle = NSMutableParagraphStyle() + + paragraphStyle.lineHeightMultiple = 1.17 + self.OneLinerLabel.attributedText = NSMutableAttributedString(string: "“ 오늘보다 내일 더 빛나는 내가 되자 ”", attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle]) + + let parent = self.OneLinerLabel! + + view.addSubview(OneLinerLabel) + + OneLinerLabel.translatesAutoresizingMaskIntoConstraints = false + + OneLinerLabel.widthAnchor.constraint(equalToConstant: 221).isActive = true + + OneLinerLabel.heightAnchor.constraint(equalToConstant: 21).isActive = true + + OneLinerLabel.leadingAnchor.constraint(equalTo: parent.leadingAnchor, constant: 77).isActive = true + + OneLinerLabel.topAnchor.constraint(equalTo: parent.topAnchor, constant: 342).isActive = true + } + +} + + diff --git a/Better-me-iOS/Base.lproj/Main.storyboard b/Better-me-iOS/Base.lproj/Main.storyboard index 915e7f1..7635fe1 100644 --- a/Better-me-iOS/Base.lproj/Main.storyboard +++ b/Better-me-iOS/Base.lproj/Main.storyboard @@ -474,7 +474,7 @@ - + @@ -901,21 +901,212 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -1201,7 +1392,7 @@ - + @@ -1342,7 +1533,7 @@ - + @@ -2164,10 +2355,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2175,6 +2473,10 @@ + + + +