Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

๐Ÿ”€ :: (#530) ๋ณด๊ด€ํ•จํƒญ์„ ReactorKit์œผ๋กœ ๋ฆฌํŒฉํ•ฉ๋‹ˆ๋‹ค. #533

Merged
merged 48 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
cf23d3f
:recycle: :: AfterLoginVC์„ StorageVC๋กœ ๋ณ€ํ™˜
yongbeomkwak May 9, 2024
0a57434
:bricks: :: ํฌ๋งท
yongbeomkwak May 9, 2024
43ed1d9
:recycle: :: storageComponent -> storageFactory
yongbeomkwak May 9, 2024
bddd134
:bricks: :: ํฌ๋งทํŒ…
yongbeomkwak May 9, 2024
ba21e85
:recycle: :: ํŽธ์ง‘ ์ด๋ฒคํŠธ ๋ฐ ๋กœ๊ทธ์ธ ํŒ์—… ์—ฐ๊ฒฐ
yongbeomkwak May 10, 2024
e998ff8
:bricks: :: ํฌ๋งทํŒ…
yongbeomkwak May 10, 2024
bdcfc02
:lipstick: :: ๋กœ๊ทธ์ธ ์›Œ๋‹ ๋ทฐ
yongbeomkwak May 10, 2024
b25c195
:recycle: :: MyPlaylistVC์— ๋ฆฌ์•กํ„ฐํ‚ท ์ ์šฉ
yongbeomkwak May 10, 2024
79859a4
:bricks: :: ํฌ๋งทํŒ…
yongbeomkwak May 10, 2024
5ec411c
:zap: :: ๋กœ๊ทธ์ธ WarningView ์ ์šฉ
yongbeomkwak May 10, 2024
1452d83
:bricks: :: ํฌ๋งทํŒ…
yongbeomkwak May 10, 2024
a0b7d1b
:recycle: :: ํ”Œ๋ ˆ์ด๋ฆฌ์ŠคํŠธ์™€ ์Šคํ† ๋ฆฌ์ง€ ์—ฐ๊ฒฐ with StorageCommonService
yongbeomkwak May 10, 2024
5c28fbf
:bricks: :: ํฌ๋งทํŒ…
yongbeomkwak May 10, 2024
36ae91a
:recycle: :: ์ด๋ฒคํŠธ ๋ฆฌํŒฉ
yongbeomkwak May 10, 2024
0e14b59
:bricks: :: ํฌ๋งทํŒ…
yongbeomkwak May 10, 2024
76ee5b7
:bulb: :: ์ฃผ์„ ์ถ”๊ฐ€
yongbeomkwak May 11, 2024
20cdf9d
:bricks: :: ํฌ๋งทํŒ…
yongbeomkwak May 11, 2024
5db16d5
:recycle: :: AfterLoginVC์„ StorageVC๋กœ ๋ณ€ํ™˜
yongbeomkwak May 9, 2024
d052f59
:bricks: :: ํฌ๋งท
yongbeomkwak May 9, 2024
f2b7895
:recycle: :: storageComponent -> storageFactory
yongbeomkwak May 9, 2024
999355d
:bricks: :: ํฌ๋งทํŒ…
yongbeomkwak May 9, 2024
54f0a3c
:recycle: :: ํŽธ์ง‘ ์ด๋ฒคํŠธ ๋ฐ ๋กœ๊ทธ์ธ ํŒ์—… ์—ฐ๊ฒฐ
yongbeomkwak May 10, 2024
3d3412a
:bricks: :: ํฌ๋งทํŒ…
yongbeomkwak May 10, 2024
197e6fd
:lipstick: :: ๋กœ๊ทธ์ธ ์›Œ๋‹ ๋ทฐ
yongbeomkwak May 10, 2024
663c402
:recycle: :: MyPlaylistVC์— ๋ฆฌ์•กํ„ฐํ‚ท ์ ์šฉ
yongbeomkwak May 10, 2024
3990d91
:bricks: :: ํฌ๋งทํŒ…
yongbeomkwak May 10, 2024
2248d1f
:zap: :: ๋กœ๊ทธ์ธ WarningView ์ ์šฉ
yongbeomkwak May 10, 2024
148ed5e
:bricks: :: ํฌ๋งทํŒ…
yongbeomkwak May 10, 2024
3eaefd2
:recycle: :: ํ”Œ๋ ˆ์ด๋ฆฌ์ŠคํŠธ์™€ ์Šคํ† ๋ฆฌ์ง€ ์—ฐ๊ฒฐ with StorageCommonService
yongbeomkwak May 10, 2024
4b4be56
:bricks: :: ํฌ๋งทํŒ…
yongbeomkwak May 10, 2024
3429ffb
:recycle: :: ์ด๋ฒคํŠธ ๋ฆฌํŒฉ
yongbeomkwak May 10, 2024
4ce4ae5
:bricks: :: ํฌ๋งทํŒ…
yongbeomkwak May 10, 2024
5511967
:bulb: :: ์ฃผ์„ ์ถ”๊ฐ€
yongbeomkwak May 11, 2024
95e4ec4
:bricks: :: ํฌ๋งทํŒ…
yongbeomkwak May 11, 2024
15daacb
Merge branch '530-refactory-storage-tab' of https://github.com/wakmusโ€ฆ
yongbeomkwak May 11, 2024
47be3e0
Update Projects/Features/SignInFeature/Sources/Views/LoginWarningViewโ€ฆ
yongbeomkwak May 11, 2024
9e8b226
:zap: :: var -> private let
yongbeomkwak May 11, 2024
988b0ea
:zap: :: fetch -> update
yongbeomkwak May 11, 2024
e9d28ab
:zap: :: ๋ถˆํ•–์š”ํ•œ ์ฃผ์„ ์ œ๊ฑฐ
yongbeomkwak May 11, 2024
1a38836
:zap: : guard ์ฒ˜๋ฆฌ
yongbeomkwak May 11, 2024
014ea98
:zap: :: ์ž˜๋ชป๋œ ๋ณ€์ˆ˜๋ช… ์ˆ˜์ •
yongbeomkwak May 11, 2024
165f728
:truck: :: LoginWarningView ๋””์ž์ธ ์‹œ์Šคํ…œ์œผ๋กœ ์ด์ „ ๋ฐ ํŒฉํ† ๋ฆฌ ์ œ๊ฑฐ
yongbeomkwak May 11, 2024
3f19610
:bricks: :: ํฌ๋งทํŒ…
yongbeomkwak May 11, 2024
60c43eb
:bug: :: Utility ์ œ๊ฑฐ
yongbeomkwak May 11, 2024
d3fcef0
:zap: :: ์›Œ๋‹ ๋ทฐ RX์ œ๊ฑฐ ๋ฐ ๊ทธ๋ฆผ์ž ์—ฌ๋ฐฑ ๊ณ ๋ ค ๊ฐ„๊ฒฉ ์กฐ์ ˆ
yongbeomkwak May 11, 2024
c494f4e
:bricks: :: ํฌ๋งทํŒ…
yongbeomkwak May 11, 2024
a25a2c2
:zap: :: ํŒ์—… ์‹œ ๋ฐ”ํ…€ ํƒญ ๋ฎ๊ธฐ
yongbeomkwak May 11, 2024
64deae6
Merge branch 'develop' into 530-refactory-storage-tab
yongbeomkwak May 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions Projects/App/Sources/Application/AppComponent+Auth.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import BaseFeature
import SignInFeature
import SignInFeatureInterface
import StorageFeature
import StorageFeatureInterface

// MARK: ๋ณ€์ˆ˜๋ช… ์ฃผ์˜
// AppComponent ๋‚ด ๋ณ€์ˆ˜ == Dependency ๋‚ด ๋ณ€์ˆ˜ ์ด๋ฆ„ ๊ฐ™์•„์•ผํ•จ
Expand All @@ -13,14 +14,10 @@ public extension AppComponent {
SignInComponent(parent: self)
}

var storageComponent: StorageComponent {
var storageFactory: any StorageFactory {
StorageComponent(parent: self)
}

var afterLoginComponent: AfterLoginComponent {
AfterLoginComponent(parent: self)
}

var requestComponent: RequestComponent {
RequestComponent(parent: self)
}
Expand Down
79 changes: 24 additions & 55 deletions Projects/App/Sources/Application/NeedleGenerated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import SignInFeatureInterface
import SongsDomain
import SongsDomainInterface
import StorageFeature
import StorageFeatureInterface
import UIKit
import UserDomain
import UserDomainInterface
Expand Down Expand Up @@ -177,8 +178,8 @@ private class MainTabBarDependencycd05b79389a6a7a6c20fProvider: MainTabBarDepend
var artistComponent: ArtistComponent {
return appComponent.artistComponent
}
var storageComponent: StorageComponent {
return appComponent.storageComponent
var storageFactory: any StorageFactory {
return appComponent.storageFactory
}
var myInfoComponent: MyInfoComponent {
return appComponent.myInfoComponent
Expand Down Expand Up @@ -325,8 +326,17 @@ private class StorageDependency1447167c38e97ef97427Provider: StorageDependency {
var signInFactory: any SignInFactory {
return appComponent.signInFactory
}
var afterLoginComponent: AfterLoginComponent {
return appComponent.afterLoginComponent
var myPlayListComponent: MyPlayListComponent {
return appComponent.myPlayListComponent
}
var multiPurposePopUpFactory: any MultiPurposePopUpFactory {
return appComponent.multiPurposePopUpFactory
}
var favoriteComponent: FavoriteComponent {
return appComponent.favoriteComponent
}
var textPopUpFactory: any TextPopUpFactory {
return appComponent.textPopUpFactory
}
private let appComponent: AppComponent
init(appComponent: AppComponent) {
Expand Down Expand Up @@ -391,6 +401,9 @@ private class MyPlayListDependency067bbf42b28f80e413acProvider: MyPlayListDepend
var textPopUpFactory: any TextPopUpFactory {
return appComponent.textPopUpFactory
}
var signInFactory: any SignInFactory {
return appComponent.signInFactory
}
private let appComponent: AppComponent
init(appComponent: AppComponent) {
self.appComponent = appComponent
Expand All @@ -400,40 +413,6 @@ private class MyPlayListDependency067bbf42b28f80e413acProvider: MyPlayListDepend
private func factory51a57a92f76af93a9ec2f47b58f8f304c97af4d5(_ component: NeedleFoundation.Scope) -> AnyObject {
return MyPlayListDependency067bbf42b28f80e413acProvider(appComponent: parent1(component) as! AppComponent)
}
private class AfterLoginDependencya880b76858e0a77ed700Provider: AfterLoginDependency {
var fetchUserInfoUseCase: any FetchUserInfoUseCase {
return appComponent.fetchUserInfoUseCase
}
var logoutUseCase: any LogoutUseCase {
return appComponent.logoutUseCase
}
var requestComponent: RequestComponent {
return appComponent.requestComponent
}
var profilePopComponent: ProfilePopComponent {
return appComponent.profilePopComponent
}
var myPlayListComponent: MyPlayListComponent {
return appComponent.myPlayListComponent
}
var multiPurposePopUpFactory: any MultiPurposePopUpFactory {
return appComponent.multiPurposePopUpFactory
}
var favoriteComponent: FavoriteComponent {
return appComponent.favoriteComponent
}
var textPopUpFactory: any TextPopUpFactory {
return appComponent.textPopUpFactory
}
private let appComponent: AppComponent
init(appComponent: AppComponent) {
self.appComponent = appComponent
}
}
/// ^->AppComponent->AfterLoginComponent
private func factory6cc9c8141e04494113b8f47b58f8f304c97af4d5(_ component: NeedleFoundation.Scope) -> AnyObject {
return AfterLoginDependencya880b76858e0a77ed700Provider(appComponent: parent1(component) as! AppComponent)
}
private class FavoriteDependency8f7fd37aeb6f0e5d0e30Provider: FavoriteDependency {
var containSongsFactory: any ContainSongsFactory {
return appComponent.containSongsFactory
Expand Down Expand Up @@ -798,8 +777,7 @@ extension AppComponent: Registration {
localTable["fetchLyricsUseCase-any FetchLyricsUseCase"] = { [unowned self] in self.fetchLyricsUseCase as Any }
localTable["fetchNewSongsUseCase-any FetchNewSongsUseCase"] = { [unowned self] in self.fetchNewSongsUseCase as Any }
localTable["signInFactory-any SignInFactory"] = { [unowned self] in self.signInFactory as Any }
localTable["storageComponent-StorageComponent"] = { [unowned self] in self.storageComponent as Any }
localTable["afterLoginComponent-AfterLoginComponent"] = { [unowned self] in self.afterLoginComponent as Any }
localTable["storageFactory-any StorageFactory"] = { [unowned self] in self.storageFactory as Any }
localTable["requestComponent-RequestComponent"] = { [unowned self] in self.requestComponent as Any }
localTable["localAuthDataSource-any LocalAuthDataSource"] = { [unowned self] in self.localAuthDataSource as Any }
localTable["remoteAuthDataSource-any RemoteAuthDataSource"] = { [unowned self] in self.remoteAuthDataSource as Any }
Expand Down Expand Up @@ -930,7 +908,7 @@ extension MainTabBarComponent: Registration {
keyPathToName[\MainTabBarDependency.chartComponent] = "chartComponent-ChartComponent"
keyPathToName[\MainTabBarDependency.searchFactory] = "searchFactory-any SearchFactory"
keyPathToName[\MainTabBarDependency.artistComponent] = "artistComponent-ArtistComponent"
keyPathToName[\MainTabBarDependency.storageComponent] = "storageComponent-StorageComponent"
keyPathToName[\MainTabBarDependency.storageFactory] = "storageFactory-any StorageFactory"
keyPathToName[\MainTabBarDependency.myInfoComponent] = "myInfoComponent-MyInfoComponent"
keyPathToName[\MainTabBarDependency.noticePopupComponent] = "noticePopupComponent-NoticePopupComponent"
keyPathToName[\MainTabBarDependency.noticeComponent] = "noticeComponent-NoticeComponent"
Expand Down Expand Up @@ -986,7 +964,10 @@ extension ServiceInfoComponent: Registration {
extension StorageComponent: Registration {
public func registerItems() {
keyPathToName[\StorageDependency.signInFactory] = "signInFactory-any SignInFactory"
keyPathToName[\StorageDependency.afterLoginComponent] = "afterLoginComponent-AfterLoginComponent"
keyPathToName[\StorageDependency.myPlayListComponent] = "myPlayListComponent-MyPlayListComponent"
keyPathToName[\StorageDependency.multiPurposePopUpFactory] = "multiPurposePopUpFactory-any MultiPurposePopUpFactory"
keyPathToName[\StorageDependency.favoriteComponent] = "favoriteComponent-FavoriteComponent"
keyPathToName[\StorageDependency.textPopUpFactory] = "textPopUpFactory-any TextPopUpFactory"
}
}
extension FaqComponent: Registration {
Expand All @@ -1010,18 +991,7 @@ extension MyPlayListComponent: Registration {
keyPathToName[\MyPlayListDependency.deletePlayListUseCase] = "deletePlayListUseCase-any DeletePlayListUseCase"
keyPathToName[\MyPlayListDependency.logoutUseCase] = "logoutUseCase-any LogoutUseCase"
keyPathToName[\MyPlayListDependency.textPopUpFactory] = "textPopUpFactory-any TextPopUpFactory"
}
}
extension AfterLoginComponent: Registration {
public func registerItems() {
keyPathToName[\AfterLoginDependency.fetchUserInfoUseCase] = "fetchUserInfoUseCase-any FetchUserInfoUseCase"
keyPathToName[\AfterLoginDependency.logoutUseCase] = "logoutUseCase-any LogoutUseCase"
keyPathToName[\AfterLoginDependency.requestComponent] = "requestComponent-RequestComponent"
keyPathToName[\AfterLoginDependency.profilePopComponent] = "profilePopComponent-ProfilePopComponent"
keyPathToName[\AfterLoginDependency.myPlayListComponent] = "myPlayListComponent-MyPlayListComponent"
keyPathToName[\AfterLoginDependency.multiPurposePopUpFactory] = "multiPurposePopUpFactory-any MultiPurposePopUpFactory"
keyPathToName[\AfterLoginDependency.favoriteComponent] = "favoriteComponent-FavoriteComponent"
keyPathToName[\AfterLoginDependency.textPopUpFactory] = "textPopUpFactory-any TextPopUpFactory"
keyPathToName[\MyPlayListDependency.signInFactory] = "signInFactory-any SignInFactory"
}
}
extension FavoriteComponent: Registration {
Expand Down Expand Up @@ -1205,7 +1175,6 @@ private func registerProviderFactory(_ componentPath: String, _ factory: @escapi
registerProviderFactory("^->AppComponent->FaqComponent", factory4e13cc6545633ffc2ed5f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->QuestionComponent", factoryedad1813a36115eec11ef47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->MyPlayListComponent", factory51a57a92f76af93a9ec2f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->AfterLoginComponent", factory6cc9c8141e04494113b8f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->FavoriteComponent", factory8e4acb90bd0d9b48604af47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->RequestComponent", factory13954fb3ec537bab80bcf47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->NoticeDetailComponent", factory3db143c2f80d621d5a7fe3b0c44298fc1c149afb)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ import NoticeDomainInterface
import SearchFeature
import SearchFeatureInterface
import StorageFeature
import StorageFeatureInterface

public protocol MainTabBarDependency: Dependency {
var fetchNoticeUseCase: any FetchNoticeUseCase { get }
var homeComponent: HomeComponent { get }
var chartComponent: ChartComponent { get }
var searchFactory: any SearchFactory { get }
var artistComponent: ArtistComponent { get }
var storageComponent: StorageComponent { get }
var storageFactory: any StorageFactory { get }
var myInfoComponent: MyInfoComponent { get }
var noticePopupComponent: NoticePopupComponent { get }
var noticeComponent: NoticeComponent { get }
Expand All @@ -33,7 +34,7 @@ public final class MainTabBarComponent: Component<MainTabBarDependency> {
chartComponent: self.dependency.chartComponent,
searchFactory: self.dependency.searchFactory,
artistComponent: self.dependency.artistComponent,
storageCompoent: self.dependency.storageComponent,
storageFactory: self.dependency.storageFactory,
myInfoComponent: self.dependency.myInfoComponent,
noticePopupComponent: self.dependency.noticePopupComponent,
noticeComponent: self.dependency.noticeComponent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import SearchFeature
import SearchFeatureInterface
import SnapKit
import StorageFeature
import StorageFeatureInterface
import UIKit
import Utility

Expand All @@ -23,7 +24,7 @@ public final class MainTabBarViewController: BaseViewController, ViewControllerF
chartComponent.makeView().wrapNavigationController,
searchFactory.makeView().wrapNavigationController,
artistComponent.makeView().wrapNavigationController,
storageComponent.makeView().wrapNavigationController,
storageFactory.makeView().wrapNavigationController,
myInfoComponent.makeView().wrapNavigationController
]
}()
Expand All @@ -37,7 +38,7 @@ public final class MainTabBarViewController: BaseViewController, ViewControllerF
private var chartComponent: ChartComponent!
private var searchFactory: SearchFactory!
private var artistComponent: ArtistComponent!
private var storageComponent: StorageComponent!
private var storageFactory: StorageFactory!
private var myInfoComponent: MyInfoComponent!
private var noticePopupComponent: NoticePopupComponent!
private var noticeComponent: NoticeComponent!
Expand Down Expand Up @@ -65,7 +66,7 @@ public final class MainTabBarViewController: BaseViewController, ViewControllerF
chartComponent: ChartComponent,
searchFactory: SearchFactory,
artistComponent: ArtistComponent,
storageCompoent: StorageComponent,
storageFactory: StorageFactory,
myInfoComponent: MyInfoComponent,
noticePopupComponent: NoticePopupComponent,
noticeComponent: NoticeComponent,
Expand All @@ -77,7 +78,7 @@ public final class MainTabBarViewController: BaseViewController, ViewControllerF
viewController.chartComponent = chartComponent
viewController.searchFactory = searchFactory
viewController.artistComponent = artistComponent
viewController.storageComponent = storageCompoent
viewController.storageFactory = storageFactory
viewController.myInfoComponent = myInfoComponent
viewController.noticePopupComponent = noticePopupComponent
viewController.noticeComponent = noticeComponent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ private extension PlaylistDetailReactor {

/// ์ˆœ์„œ ๋ณ€๊ฒฝ
func updateOrder(src: Int, dest: Int) -> Observable<Mutation> {
var tmp = (currentState.dataSource.first ?? PlayListDetailSectionModel(model: 0, items: [])).items
guard var tmp = currentState.dataSource.first?.items else {
LogManager.printError("playlist detail datasource is empty")
return .empty()
}
let target = tmp[src]
tmp.remove(at: src)
tmp.insert(target, at: dest)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,108 @@ extension LoginViewController {
}
}

extension LoginViewController {
public func configureUI() {
appLogoImageView.image = DesignSystemAsset.Logo.applogo.image
scrollView.verticalScrollIndicatorInsets = UIEdgeInsets(top: 0, left: 0, bottom: 56, right: 0)
configureOAuthLogin()
configureService()
}

private func configureOAuthLogin() {
let loginAttributedString: [NSMutableAttributedString] = [
NSMutableAttributedString.init(string: "๋„ค์ด๋ฒ„๋กœ ๋กœ๊ทธ์ธํ•˜๊ธฐ"),
NSMutableAttributedString.init(string: "๊ตฌ๊ธ€๋กœ ๋กœ๊ทธ์ธํ•˜๊ธฐ"),
NSMutableAttributedString.init(string: "์• ํ”Œ๋กœ ๋กœ๊ทธ์ธํ•˜๊ธฐ")
]

for attr in loginAttributedString {
attr.addAttributes(
[
.font: DesignSystemFontFamily.Pretendard.medium.font(size: 16),
.foregroundColor: DesignSystemAsset.GrayColor.gray900.color,
.kern: -0.5
],
range: NSRange(location: 0, length: attr.string.count)
)
}

let superViewArr: [UIView] = [naverSuperView, googleSuperView, appleSuperView]
for sv in superViewArr {
sv.backgroundColor = .white.withAlphaComponent(0.4)
sv.layer.cornerRadius = 12
sv.layer.borderColor = DesignSystemAsset.GrayColor.gray200.color.cgColor
sv.layer.borderWidth = 1
}

naverImageVIew.image = DesignSystemAsset.Signup.naver.image
naverLoginButton.setAttributedTitle(loginAttributedString[0], for: .normal)
googleImageView.image = DesignSystemAsset.Signup.google.image
googleLoginButton.setAttributedTitle(loginAttributedString[1], for: .normal)
appleImageView.image = DesignSystemAsset.Signup.apple.image
appleLoginButton.setAttributedTitle(loginAttributedString[2], for: .normal)
}

private func configureService() {
let appAttributedString = NSMutableAttributedString
.init(string: "์™ํƒ€๋ฒ„์Šค ๋ฎค์ง")

appAttributedString.addAttributes(
[
.font: DesignSystemFontFamily.Pretendard.medium.font(size: 20),
.foregroundColor: DesignSystemAsset.GrayColor.gray900.color,
.kern: -0.5
],
range: NSRange(location: 0, length: appAttributedString.string.count)
)
appNameLabel.attributedText = appAttributedString

let descriptionAttributedString = NSMutableAttributedString
.init(string: "ํŽ˜์ด์ง€๋ฅผ ์ด์šฉํ•˜๊ธฐ ์œ„ํ•ด ๋กœ๊ทธ์ธ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.")

descriptionAttributedString.addAttributes(
[
.font: DesignSystemFontFamily.Pretendard.light.font(size: 14),
.foregroundColor: DesignSystemAsset.GrayColor.gray600.color,
.kern: -0.5
],
range: NSRange(location: 0, length: descriptionAttributedString.string.count)
)
descriptionLabel.attributedText = descriptionAttributedString

let servicePrivacyButtons: [UIButton] = [serviceButton, privacyButton]
let termsAttributedString: [NSMutableAttributedString] = [
NSMutableAttributedString.init(string: "์„œ๋น„์Šค ์ด์šฉ์•ฝ๊ด€"),
NSMutableAttributedString.init(string: "๊ฐœ์ธ์ •๋ณด์ฒ˜๋ฆฌ๋ฐฉ์นจ")
]
for attr in termsAttributedString {
attr.addAttributes(
[
.font: DesignSystemFontFamily.Pretendard.medium.font(size: 14),
.foregroundColor: DesignSystemAsset.GrayColor.gray600.color,
.kern: -0.5
],
range: NSRange(location: 0, length: attr.string.count)
)
}
servicePrivacyButtons[0].setAttributedTitle(termsAttributedString[0], for: .normal)
servicePrivacyButtons[1].setAttributedTitle(termsAttributedString[1], for: .normal)

for btn in servicePrivacyButtons {
btn.layer.cornerRadius = 8
btn.layer.borderColor = DesignSystemAsset.GrayColor.gray300.color.cgColor
btn.layer.borderWidth = 1
btn.clipsToBounds = true
}

versionLabel.text = "๋ฒ„์ „ ์ •๋ณด " + APP_VERSION()
versionLabel.textColor = DesignSystemAsset.GrayColor.gray400.color
versionLabel.font = DesignSystemFontFamily.Pretendard.light.font(size: 12)
versionLabel.setTextWithAttributes(kernValue: -0.5)
versionLabel.textAlignment = .center
}
}

public extension LoginViewController {
func scrollToTop() {
scrollView.setContentOffset(.zero, animated: true)
Expand Down
Loading
Loading