diff --git a/Projects/Features/PickleFeature/Sources/Supporter/Profile/UserProfileView.swift b/Projects/Features/PickleFeature/Sources/Supporter/Profile/UserProfileView.swift index 05c170df..0c86784b 100644 --- a/Projects/Features/PickleFeature/Sources/Supporter/Profile/UserProfileView.swift +++ b/Projects/Features/PickleFeature/Sources/Supporter/Profile/UserProfileView.swift @@ -7,10 +7,7 @@ import DSKit open class UserProfileView: UIView { - private lazy var userNameTitle = UILabel().then { - $0.numberOfLines = 1 - $0.backgroundColor = .clear - } + private lazy var userNameTitle = MGLabel(numberOfLineCount: 1) private lazy var smallProfile = MGProfileView(profileImage: MGProfileImage(type: .custom, customImage: nil), profileType: .smallProfile) diff --git a/Projects/Features/PostureFeature/Sources/PostureScene/View/PostureMainViewController.swift b/Projects/Features/PostureFeature/Sources/PostureScene/View/PostureMainViewController.swift index 52a52e9b..a5ea90ca 100644 --- a/Projects/Features/PostureFeature/Sources/PostureScene/View/PostureMainViewController.swift +++ b/Projects/Features/PostureFeature/Sources/PostureScene/View/PostureMainViewController.swift @@ -17,12 +17,11 @@ public class PostureMainViewController: BaseViewController private let categoryTitleList = ["추천", "가슴", "등", "어깨", "팔", "복근", "앞 허벅지"] - private let titleText = UILabel().then { - $0.text = "자세" - $0.textColor = .black - $0.font = UIFont.Pretendard.titleLarge - $0.textAlignment = .left - } + private let titleText = MGLabel(text: "자세", + font: UIFont.Pretendard.titleLarge, + textColor: .black, + isCenter: false + ) private lazy var pagingTabBar = MGPagingTabBar(categoryTitleList: categoryTitleList) diff --git a/Projects/Features/PostureFeature/Sources/Supporter/Detail/RelatedPickle/PostureDetailPickeTableViewCell.swift b/Projects/Features/PostureFeature/Sources/Supporter/Detail/RelatedPickle/PostureDetailPickeTableViewCell.swift index 7c8493bb..614d3f26 100644 --- a/Projects/Features/PostureFeature/Sources/Supporter/Detail/RelatedPickle/PostureDetailPickeTableViewCell.swift +++ b/Projects/Features/PostureFeature/Sources/Supporter/Detail/RelatedPickle/PostureDetailPickeTableViewCell.swift @@ -12,12 +12,11 @@ public class PostureDetailPickeTableViewCell: BaseTableViewCell { private var pickleColellectionView: UICollectionView! - private let titleLabel = UILabel().then { - $0.text = "관련 피클" - $0.textColor = .black - $0.font = UIFont.Pretendard.titleMedium - $0.textAlignment = .left - } + private let titleLabel = MGLabel(text: "관련 피클", + font: UIFont.Pretendard.titleMedium, + textColor: .black, + isCenter: false + ) var pickleData: [PostureDetailPickleImageModel] = [] { didSet { diff --git a/Projects/Features/PostureFeature/Sources/Supporter/Detail/TitleCaution/PostureDetailCautionTableViewCell.swift b/Projects/Features/PostureFeature/Sources/Supporter/Detail/TitleCaution/PostureDetailCautionTableViewCell.swift index 9a444465..ae61ce92 100644 --- a/Projects/Features/PostureFeature/Sources/Supporter/Detail/TitleCaution/PostureDetailCautionTableViewCell.swift +++ b/Projects/Features/PostureFeature/Sources/Supporter/Detail/TitleCaution/PostureDetailCautionTableViewCell.swift @@ -8,12 +8,11 @@ import DSKit public class PostureDetailCautionTableViewCell: UITableViewCell { static let identifier: String = "PostureDetailCautionTableViewCell" - private var exerciseWay = UILabel().then { - $0.text = "주의사항" - $0.textColor = .black - $0.textAlignment = .left - $0.font = UIFont.Pretendard.titleMedium - } + private var exerciseWay = MGLabel(text: "주의사항", + font: UIFont.Pretendard.titleMedium, + textColor: .black, + isCenter: false + ) private var exerciseCaution1 = MGPostureInfoLabel( titleNumber: "01", diff --git a/Projects/Features/PostureFeature/Sources/Supporter/Detail/TitleInfo/PostureDetailExerciseInfoTableViewCell.swift b/Projects/Features/PostureFeature/Sources/Supporter/Detail/TitleInfo/PostureDetailExerciseInfoTableViewCell.swift index aa5970c1..58466f0f 100644 --- a/Projects/Features/PostureFeature/Sources/Supporter/Detail/TitleInfo/PostureDetailExerciseInfoTableViewCell.swift +++ b/Projects/Features/PostureFeature/Sources/Supporter/Detail/TitleInfo/PostureDetailExerciseInfoTableViewCell.swift @@ -11,12 +11,11 @@ public class PostureDetailExerciseInfoTableViewCell: BaseTableViewCell { static let identifier: String = "PostureDetailExerciseInfoTableViewCell" - private var exerciseWay = UILabel().then { - $0.text = "운동 방법" - $0.textColor = .black - $0.textAlignment = .left - $0.font = UIFont.Pretendard.titleMedium - } + private var exerciseWay = MGLabel(text: "운동 방법", + font: UIFont.Pretendard.titleMedium, + textColor: .black, + isCenter: false + ) private var exerciseInfo1 = MGPostureInfoLabel( titleNumber: "01", diff --git a/Projects/Features/PostureFeature/Sources/Supporter/Detail/TitleText/PostureDetailTitleTableViewCell.swift b/Projects/Features/PostureFeature/Sources/Supporter/Detail/TitleText/PostureDetailTitleTableViewCell.swift index 7b7765ae..0ee193c2 100644 --- a/Projects/Features/PostureFeature/Sources/Supporter/Detail/TitleText/PostureDetailTitleTableViewCell.swift +++ b/Projects/Features/PostureFeature/Sources/Supporter/Detail/TitleText/PostureDetailTitleTableViewCell.swift @@ -10,18 +10,17 @@ import Domain public class PostureDetailTitleTableViewCell: BaseTableViewCell{ static let identifier: String = "PostureDetailTitleTableViewCell" + + private var englishTitle = MGLabel(font: UIFont.Pretendard.titleMedium, + textColor: DSKitAsset.Colors.gray600.color, + isCenter: false + ) - private var englishTitle = UILabel().then { - $0.font = UIFont.Pretendard.titleMedium - $0.textColor = DSKitAsset.Colors.gray600.color - $0.textAlignment = .left - } + private var koreanTitle = MGLabel(font: UIFont.Pretendard.titleLarge, + textColor: .black, + isCenter: false + ) - private var koreanTitle = UILabel().then { - $0.font = UIFont.Pretendard.titleLarge - $0.textColor = .black - $0.textAlignment = .left - } public override func layout() { contentView.addSubviews([englishTitle, koreanTitle]) diff --git a/Projects/Features/PostureFeature/Sources/Supporter/Search/PostureSearchTableViewCell.swift b/Projects/Features/PostureFeature/Sources/Supporter/Search/PostureSearchTableViewCell.swift index d1a687bf..678d6d3a 100644 --- a/Projects/Features/PostureFeature/Sources/Supporter/Search/PostureSearchTableViewCell.swift +++ b/Projects/Features/PostureFeature/Sources/Supporter/Search/PostureSearchTableViewCell.swift @@ -15,19 +15,17 @@ public class PostureSearchTableViewCell: UITableViewCell { $0.backgroundColor = DSKitAsset.Colors.gray50.color $0.layer.cornerRadius = 8.0 } - - private var exerciseNameLabel = UILabel().then { - $0.font = UIFont.Pretendard.bodyMedium - $0.textColor = .black - $0.textAlignment = .left - } - - private var exercisePartLabel = UILabel().then { - $0.font = UIFont.Pretendard.bodyMedium - $0.textColor = DSKitAsset.Colors.gray400.color - $0.textAlignment = .left - } - + + private var exerciseNameLabel = MGLabel(font: UIKit.UIFont.Pretendard.bodyMedium, + textColor: .black, + isCenter: false + ) + + private var exercisePartLabel = MGLabel(font: UIFont.Pretendard.bodyMedium, + textColor: DSKitAsset.Colors.gray400.color, + isCenter: false + ) + public func setup(image: UIImage, name: String, part: String) { searchImageView.image = image exerciseNameLabel.text = name diff --git a/Projects/Features/PostureFeature/Sources/Supporter/Tab/PosturePartTableViewCell.swift b/Projects/Features/PostureFeature/Sources/Supporter/Tab/PosturePartTableViewCell.swift index 494684f8..0a5a2368 100644 --- a/Projects/Features/PostureFeature/Sources/Supporter/Tab/PosturePartTableViewCell.swift +++ b/Projects/Features/PostureFeature/Sources/Supporter/Tab/PosturePartTableViewCell.swift @@ -16,12 +16,10 @@ public class PosturePartTableViewCell: BaseTableViewCell { $0.layer.cornerRadius = 8.0 } - private let exerciseNameLabel = UILabel().then { - $0.textColor = .black - $0.backgroundColor = .clear - $0.textAlignment = .left - $0.font = UIFont.Pretendard.bodyMedium - } + private let exerciseNameLabel = MGLabel(font: UIFont.Pretendard.bodyMedium, + textColor: .black, + isCenter: false + ) public override func layout() { super.layout() diff --git a/Projects/Features/PostureFeature/Sources/Supporter/Tab/Recommand/PostureRecommandCollectionViewCell.swift b/Projects/Features/PostureFeature/Sources/Supporter/Tab/Recommand/PostureRecommandCollectionViewCell.swift index 04fc2784..3a2ca645 100644 --- a/Projects/Features/PostureFeature/Sources/Supporter/Tab/Recommand/PostureRecommandCollectionViewCell.swift +++ b/Projects/Features/PostureFeature/Sources/Supporter/Tab/Recommand/PostureRecommandCollectionViewCell.swift @@ -15,17 +15,13 @@ public class PostureRecommandCollectionViewCell: UICollectionViewCell { $0.layer.cornerRadius = 8.0 } - private var exerciseNameLabel = UILabel().then { - $0.textColor = .black - $0.backgroundColor = .clear - $0.textAlignment = .left - } + private var exerciseNameLabel = MGLabel(textColor: .black, + isCenter: false + ) - private var exercisePartLabel = UILabel().then { - $0.textColor = DSKitAsset.Colors.gray600.color - $0.backgroundColor = .clear - $0.textAlignment = .left - } + private var exercisePartLabel = MGLabel(textColor: DSKitAsset.Colors.gray600.color, + isCenter: false + ) private func layout() { addSubviews([postureImageView, exerciseNameLabel, exercisePartLabel]) diff --git a/Projects/Features/PostureFeature/Sources/Supporter/Tab/Recommand/PostureRecommandTableViewCell.swift b/Projects/Features/PostureFeature/Sources/Supporter/Tab/Recommand/PostureRecommandTableViewCell.swift index 924b6758..81b48daf 100644 --- a/Projects/Features/PostureFeature/Sources/Supporter/Tab/Recommand/PostureRecommandTableViewCell.swift +++ b/Projects/Features/PostureFeature/Sources/Supporter/Tab/Recommand/PostureRecommandTableViewCell.swift @@ -18,11 +18,10 @@ public class PostureRecommandTableViewCell: BaseTableViewCell{ $0.layer.cornerRadius = 8.0 } - private var exerciseTitleLabel = UILabel().then { - $0.font = UIFont.Pretendard.titleMedium - $0.textColor = .black - $0.contentMode = .left - } + private var exerciseTitleLabel = MGLabel(font: UIFont.Pretendard.titleMedium, + textColor: .black, + isCenter: false + ) private var seemoreButton = MaeumGaGymSeeMoreButton() diff --git a/Projects/Features/SelfCareFeature/Sources/AlbumScene/View/NavigationBar/AlbumNavigationBar.swift b/Projects/Features/SelfCareFeature/Sources/AlbumScene/View/NavigationBar/AlbumNavigationBar.swift index 40ffb2ca..ca78815b 100644 --- a/Projects/Features/SelfCareFeature/Sources/AlbumScene/View/NavigationBar/AlbumNavigationBar.swift +++ b/Projects/Features/SelfCareFeature/Sources/AlbumScene/View/NavigationBar/AlbumNavigationBar.swift @@ -16,11 +16,10 @@ final public class AlbumNavigationBar: UIView { private let leftButton = MGImageButton(image: SelfCareResourcesService.Assets.leftArrow) - private let leftLabel = UILabel().then { - $0.font = UIFont.Pretendard.titleMedium - $0.text = SelfCareResourcesService.Title.selectPicture - $0.textColor = .white - } + private let leftLabel = MGLabel(text: SelfCareResourcesService.Title.selectPicture, + font: UIFont.Pretendard.titleMedium, + textColor: .white + ) private lazy var leftItemsStackView = UIStackView(arrangedSubviews: [leftButton, leftLabel]).then { $0.axis = .horizontal diff --git a/Projects/Features/SelfCareFeature/Sources/CameraScene/View/NavigationBar/CameraNavigationBar.swift b/Projects/Features/SelfCareFeature/Sources/CameraScene/View/NavigationBar/CameraNavigationBar.swift index 5eec1e3d..2b540ccf 100644 --- a/Projects/Features/SelfCareFeature/Sources/CameraScene/View/NavigationBar/CameraNavigationBar.swift +++ b/Projects/Features/SelfCareFeature/Sources/CameraScene/View/NavigationBar/CameraNavigationBar.swift @@ -16,11 +16,10 @@ final public class CameraNavigationBar: UIView { private let leftButton = MGImageButton(image: SelfCareResourcesService.Assets.cameraCancle) - private let leftLabel = UILabel().then { - $0.font = UIFont.Pretendard.titleMedium - $0.text = "사진 촬영" - $0.textColor = .white - } + private let leftLabel = MGLabel(text: "사진 촬영", + font: UIFont.Pretendard.titleMedium, + textColor: .white + ) private lazy var leftItemsStackView = UIStackView(arrangedSubviews: [leftButton, leftLabel]).then { $0.axis = .horizontal diff --git a/Projects/Features/SelfCareFeature/Sources/HomeScene/View/Cell/SelfCareIntroductTableViewCell.swift b/Projects/Features/SelfCareFeature/Sources/HomeScene/View/Cell/SelfCareIntroductTableViewCell.swift index 1fff31b0..6f01d519 100644 --- a/Projects/Features/SelfCareFeature/Sources/HomeScene/View/Cell/SelfCareIntroductTableViewCell.swift +++ b/Projects/Features/SelfCareFeature/Sources/HomeScene/View/Cell/SelfCareIntroductTableViewCell.swift @@ -23,15 +23,12 @@ public class SelfCareIntroductTableViewCell: BaseTableViewCell { profileType: .smallProfile ) - private let mainTitle = UILabel().then { - $0.font = UIFont.Pretendard.titleLarge - } - - private let subTitle = UILabel().then { - $0.font = UIFont.Pretendard.bodyMedium - $0.textColor = DSKitAsset.Colors.gray600.color - $0.numberOfLines = 2 - } + private let mainTitle = MGLabel(font: UIFont.Pretendard.titleLarge) + + private let subTitle = MGLabel(font: UIFont.Pretendard.bodyMedium, + textColor: DSKitAsset.Colors.gray600.color, + numberOfLineCount: 2 + ) public func configure(with message: SelfCareIntroductModel) { titleImageView.configureImage(with: MGProfileImage(type: .custom, diff --git a/Projects/Features/SelfCareFeature/Sources/HomeScene/View/Cell/SelfCareMenuCollectionCell.swift b/Projects/Features/SelfCareFeature/Sources/HomeScene/View/Cell/SelfCareMenuCollectionCell.swift index 9892a54f..df12faf0 100644 --- a/Projects/Features/SelfCareFeature/Sources/HomeScene/View/Cell/SelfCareMenuCollectionCell.swift +++ b/Projects/Features/SelfCareFeature/Sources/HomeScene/View/Cell/SelfCareMenuCollectionCell.swift @@ -21,10 +21,9 @@ public class SelfCareMenuCollectionCell: UICollectionViewCell { $0.layer.cornerRadius = 8.0 } - private var menuLabel = UILabel().then { - $0.textColor = .black - $0.textAlignment = .center - } + private var menuLabel = MGLabel(textColor: .black, + isCenter: true + ) // 보류 // private var arrowImageView = UIImageView().then { // $0.image = UIImage(systemName: "chevron.right") diff --git a/Projects/Features/SelfCareFeature/Sources/HomeScene/View/Cell/SelfCareMenuTableViewCell.swift b/Projects/Features/SelfCareFeature/Sources/HomeScene/View/Cell/SelfCareMenuTableViewCell.swift index 2057e228..88808621 100644 --- a/Projects/Features/SelfCareFeature/Sources/HomeScene/View/Cell/SelfCareMenuTableViewCell.swift +++ b/Projects/Features/SelfCareFeature/Sources/HomeScene/View/Cell/SelfCareMenuTableViewCell.swift @@ -17,11 +17,10 @@ public class SelfCareMenuTableViewCell: BaseTableViewCell { static let identifier: String = SelfCareResourcesService.identifier.selfCareMenuTableViewCell - private var nameTitle = UILabel().then { - $0.text = SelfCareResourcesService.Title.selfCare - $0.textColor = .black - $0.font = UIFont.Pretendard.titleMedium - } + private var nameTitle = MGLabel(text: SelfCareResourcesService.Title.selfCare, + font: UIFont.Pretendard.titleMedium, + textColor: .black + ) private var selfCareMenuCollectionView: UICollectionView = { let layout = UICollectionViewFlowLayout() diff --git a/Projects/Features/SelfCareFeature/Sources/HomeScene/View/Cell/SelfCareProfileTableViewCell.swift b/Projects/Features/SelfCareFeature/Sources/HomeScene/View/Cell/SelfCareProfileTableViewCell.swift index 08158cc0..92349e9d 100644 --- a/Projects/Features/SelfCareFeature/Sources/HomeScene/View/Cell/SelfCareProfileTableViewCell.swift +++ b/Projects/Features/SelfCareFeature/Sources/HomeScene/View/Cell/SelfCareProfileTableViewCell.swift @@ -21,16 +21,14 @@ public class SelfCareProfileTableViewCell: BaseTableViewCell { customImage: DSKitAsset.Assets.basicProfile.image), profileType: .bigProfile ) + + private let userNameLabel = MGLabel(font: UIFont.Pretendard.labelLarge, + textColor: .black + ) - private let userNameLabel = UILabel().then { - $0.font = UIFont.Pretendard.labelLarge - $0.textColor = .black - } - - private var userTimerLabel = UILabel().then { - $0.font = UIFont.Pretendard.bodyMedium - $0.textColor = DSKitAsset.Colors.gray400.color - } + private var userTimerLabel = MGLabel(font: UIFont.Pretendard.bodyMedium, + textColor: DSKitAsset.Colors.gray400.color + ) private var userBageView = MGProfileView( profileImage: MGProfileImage(type: .custom, diff --git a/Projects/Features/SelfCareFeature/Sources/SelfCareScene/View/SelfCareMyRoutineViewController.swift b/Projects/Features/SelfCareFeature/Sources/SelfCareScene/View/SelfCareMyRoutineViewController.swift index d11fb500..a323a258 100644 --- a/Projects/Features/SelfCareFeature/Sources/SelfCareScene/View/SelfCareMyRoutineViewController.swift +++ b/Projects/Features/SelfCareFeature/Sources/SelfCareScene/View/SelfCareMyRoutineViewController.swift @@ -30,11 +30,11 @@ public class SelfCareMyRoutineViewController: BaseViewController