-
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.
[Merge] #105 - 404 페이지 구현 및 답글에서 프로필 클릭시 유저페이지로 이동 및 유저 투명도에 따른 글쓰기 분기처리
Feat [#105] 404 페이지 구현 및 답글에서 프로필 클릭시 유저페이지로 이동 및 유저 투명도에 따른 글쓰기 분기처리
- Loading branch information
Showing
27 changed files
with
381 additions
and
12 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
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
23 changes: 23 additions & 0 deletions
23
DontBe-iOS/DontBe-iOS/Global/Resources/Assets.xcassets/etc/img_404.imageset/Contents.json
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,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "img_404.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+13.4 KB
...OS/DontBe-iOS/Global/Resources/Assets.xcassets/etc/img_404.imageset/img_404.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+42.7 KB
...DontBe-iOS/Global/Resources/Assets.xcassets/etc/img_404.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+87.9 KB
...DontBe-iOS/Global/Resources/Assets.xcassets/etc/img_404.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
...e-iOS/DontBe-iOS/Global/Resources/Assets.xcassets/etc/img_ban_text.imageset/Contents.json
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,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "text.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+9.84 KB
.../DontBe-iOS/Global/Resources/Assets.xcassets/etc/img_ban_text.imageset/text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+19.9 KB
...ntBe-iOS/Global/Resources/Assets.xcassets/etc/img_ban_text.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+29.2 KB
...ntBe-iOS/Global/Resources/Assets.xcassets/etc/img_ban_text.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
...e-iOS/Global/Resources/Assets.xcassets/etc/img_writing_restriction.imageset/Contents.json
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,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "img_writing-restriction.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+10.3 KB
...ssets.xcassets/etc/img_writing_restriction.imageset/img_writing-restriction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+31.8 KB
...ts.xcassets/etc/img_writing_restriction.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+62.5 KB
...ts.xcassets/etc/img_writing_restriction.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
98 changes: 98 additions & 0 deletions
98
DontBe-iOS/DontBe-iOS/Presentation/404/ErrorViewController.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,98 @@ | ||
// | ||
// ErrorViewController.swift | ||
// DontBe-iOS | ||
// | ||
// Created by 변희주 on 1/18/24. | ||
// | ||
|
||
import UIKit | ||
|
||
import SnapKit | ||
|
||
final class ErrorViewController: UIViewController { | ||
|
||
// MARK: - Properties | ||
|
||
// MARK: - UI Components | ||
|
||
private let errorImage: UIImageView = { | ||
let emptyImage = UIImageView() | ||
emptyImage.image = ImageLiterals.Common.img404 | ||
return emptyImage | ||
}() | ||
|
||
private let errorTitle: UILabel = { | ||
let emptyTitle = UILabel() | ||
emptyTitle.text = StringLiterals.Network.errorMessage | ||
emptyTitle.textColor = .donBlack | ||
emptyTitle.font = .font(.body1) | ||
emptyTitle.setTextWithLineHeight(text: emptyTitle.text, lineHeight: 22.adjusted, alignment: .center) | ||
emptyTitle.numberOfLines = 2 | ||
return emptyTitle | ||
}() | ||
|
||
private let homeButton = CustomButton(title: StringLiterals.Button.goHome, backColor: .donBlack, titleColor: .donWhite) | ||
|
||
// MARK: - Life Cycles | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
|
||
setUI() | ||
setHierarchy() | ||
setLayout() | ||
setAddTarget() | ||
} | ||
} | ||
|
||
|
||
// MARK: - Extensions | ||
|
||
extension ErrorViewController { | ||
private func setUI() { | ||
self.view.backgroundColor = .donWhite | ||
} | ||
|
||
private func setHierarchy() { | ||
self.view.addSubviews(errorImage, | ||
errorTitle, | ||
homeButton) | ||
} | ||
|
||
private func setLayout() { | ||
errorImage.snp.makeConstraints { | ||
$0.top.equalToSuperview().inset(statusBarHeight + 182.adjustedH) | ||
$0.centerX.equalToSuperview() | ||
$0.width.equalTo(255.adjusted) | ||
$0.height.equalTo(150.adjusted) | ||
} | ||
|
||
errorTitle.snp.makeConstraints { | ||
$0.top.equalTo(errorImage.snp.bottom).offset(34.adjustedH) | ||
$0.centerX.equalToSuperview() | ||
} | ||
|
||
homeButton.snp.makeConstraints { | ||
$0.bottom.equalTo(self.view.safeAreaLayoutGuide).inset(29.adjusted) | ||
$0.centerX.equalToSuperview() | ||
} | ||
} | ||
|
||
private func setAddTarget() { | ||
self.homeButton.addTarget(self, action: #selector(homeButtonTapped), for: .touchUpInside) | ||
} | ||
|
||
@objc | ||
private func homeButtonTapped() { | ||
if let sceneDelegate = UIApplication.shared.connectedScenes.first?.delegate as? SceneDelegate { | ||
DispatchQueue.main.async { | ||
let viewController = DontBeTabBarController() | ||
viewController.selectedIndex = 0 | ||
if let selectedViewController = viewController.selectedViewController { | ||
viewController.applyFontColorAttributes(to: selectedViewController.tabBarItem, isSelected: true) | ||
} | ||
sceneDelegate.window?.rootViewController = UINavigationController(rootViewController: viewController) | ||
} | ||
} | ||
} | ||
} |
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
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
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
Oops, something went wrong.