Skip to content

Commit

Permalink
[Feat] Wal Creator UI 및 키보드 애니메이션 구현 (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcsoyeon committed Sep 5, 2023
1 parent a810ae0 commit 60dec88
Show file tree
Hide file tree
Showing 5 changed files with 414 additions and 10 deletions.
4 changes: 4 additions & 0 deletions WAL/WAL.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
927D10F428211017001AEB78 /* HistoryDataModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 927D10F328211017001AEB78 /* HistoryDataModel.swift */; };
927D10F6282110AA001AEB78 /* HistoryTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 927D10F5282110AA001AEB78 /* HistoryTableViewCell.swift */; };
929756A9285A4C4600A9FFA8 /* MainContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 929756A8285A4C4600A9FFA8 /* MainContentView.swift */; };
92AD24412AA72CAF0075B48E /* WalCreatorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92AD24402AA72CAF0075B48E /* WalCreatorViewController.swift */; };
92B152D02954569800918A3B /* MainTitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92B152CF2954569800918A3B /* MainTitleView.swift */; };
92C1B84E28633FB500F97D75 /* mintPaw.json in Resources */ = {isa = PBXBuildFile; fileRef = 92C1B84C28633FB500F97D75 /* mintPaw.json */; };
92C1B84F28633FB500F97D75 /* orangePaw.json in Resources */ = {isa = PBXBuildFile; fileRef = 92C1B84D28633FB500F97D75 /* orangePaw.json */; };
Expand Down Expand Up @@ -239,6 +240,7 @@
927D10F328211017001AEB78 /* HistoryDataModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoryDataModel.swift; sourceTree = "<group>"; };
927D10F5282110AA001AEB78 /* HistoryTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoryTableViewCell.swift; sourceTree = "<group>"; };
929756A8285A4C4600A9FFA8 /* MainContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainContentView.swift; sourceTree = "<group>"; };
92AD24402AA72CAF0075B48E /* WalCreatorViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WalCreatorViewController.swift; sourceTree = "<group>"; };
92B152CF2954569800918A3B /* MainTitleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTitleView.swift; sourceTree = "<group>"; };
92C1B84C28633FB500F97D75 /* mintPaw.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = mintPaw.json; sourceTree = "<group>"; };
92C1B84D28633FB500F97D75 /* orangePaw.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = orangePaw.json; sourceTree = "<group>"; };
Expand Down Expand Up @@ -725,6 +727,7 @@
5BC2DD032868DCCE00AFCC29 /* SettingCategoryViewController.swift */,
5BD3585F289D45D60066C804 /* ZanzanbariViewController.swift */,
5BD35862289D45F30066C804 /* SubController */,
92AD24402AA72CAF0075B48E /* WalCreatorViewController.swift */,
);
path = Controller;
sourceTree = "<group>";
Expand Down Expand Up @@ -1148,6 +1151,7 @@
5BB3FB792857254200A8A70D /* Constant.swift in Sources */,
5B515DA52A07FBA50013F03B /* Interceptor.swift in Sources */,
5BB17B3A2865BB3000029824 /* OnboardAPI.swift in Sources */,
92AD24412AA72CAF0075B48E /* WalCreatorViewController.swift in Sources */,
5B7EE87E2822DCB5007BC265 /* MoyaLoggerPlugin.swift in Sources */,
5B020D3F281F31B00057F9B7 /* AlarmCollectionViewCell.swift in Sources */,
9213AD072865AB67009B6002 /* HistoryService.swift in Sources */,
Expand Down
3 changes: 3 additions & 0 deletions WAL/WAL/Global/Extension/NSNotification.Name+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ extension NSNotification.Name {
static let renewToken = Notification.Name("renewToken")

static let enterMain = NSNotification.Name("EnterMain")

static let walTextViewTapped = NSNotification.Name("WalTextViewTapped")
static let walTextViewReturn = NSNotification.Name("WalTextViewReturn")
}
15 changes: 8 additions & 7 deletions WAL/WAL/Resource/Support/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
guard let nickname = UserDefaultsHelper.standard.nickname else { return }
guard let accesstoken = UserDefaultsHelper.standard.accesstoken else { return }

if nickname != Constant.Login.nickname && accesstoken != "" { // 닉네임O, 액세스토큰O -> 자동로그인 -> 메인
window?.rootViewController = UINavigationController(rootViewController: MainViewController())
} else if nickname == Constant.Login.nickname && accesstoken != "" { // 닉네임X, 액세스토큰O -> 온보딩
window?.rootViewController = UINavigationController(rootViewController: OnboardingViewController())
} else { // 로그인
window?.rootViewController = LoginViewController(viewModel: LoginViewModel())
}
// if nickname != Constant.Login.nickname && accesstoken != "" { // 닉네임O, 액세스토큰O -> 자동로그인 -> 메인
// window?.rootViewController = UINavigationController(rootViewController: MainViewController())
// } else if nickname == Constant.Login.nickname && accesstoken != "" { // 닉네임X, 액세스토큰O -> 온보딩
// window?.rootViewController = UINavigationController(rootViewController: OnboardingViewController())
// } else { // 로그인
// window?.rootViewController = LoginViewController(viewModel: LoginViewModel())
// }
window?.rootViewController = WalCreatorViewController()
window?.makeKeyAndVisible()
}

Expand Down
6 changes: 3 additions & 3 deletions WAL/WAL/Screen/Create/Controller/CreateViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,10 @@ class CreateViewController: UIViewController {
//MARK: - CustomMethod

private func setSendButton() {
let isCotentFull = walSoundTextView.text.count > 0 && datePickerData.date != nil && datePickerData.time != nil
let isContentFull = walSoundTextView.text.count > 0 && datePickerData.date != nil && datePickerData.time != nil

sendButton.backgroundColor = isCotentFull ? .orange100 : .gray400
sendButton.isEnabled = isCotentFull
sendButton.backgroundColor = isContentFull ? .orange100 : .gray400
sendButton.isEnabled = isContentFull
}

private func scroll(_ datePickerType: DatePickerType) {
Expand Down
Loading

0 comments on commit 60dec88

Please sign in to comment.