-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
1,130 additions
and
529 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ disabled_rules: | |
- nesting | ||
- cyclomatic_complexity | ||
- mark | ||
- large_tuple | ||
|
||
opt_in_rules: | ||
- empty_count | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
79 changes: 79 additions & 0 deletions
79
Milestone/Milestone/Global/Component/Shared/NetworkFailView.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,79 @@ | ||
// | ||
// NetworkFailView.swift | ||
// Milestone | ||
// | ||
// Created by 서은수 on 2023/09/27. | ||
// | ||
|
||
import UIKit | ||
|
||
import RxCocoa | ||
import RxSwift | ||
import SnapKit | ||
import Then | ||
|
||
// MARK: - 네트워크 접속 실패 뷰 | ||
|
||
class NetworkFailView: UIView { | ||
|
||
// MARK: - Subviews | ||
|
||
var failImageView = UIImageView() | ||
.then { | ||
$0.image = ImageLiteral.imgNetworkFail | ||
} | ||
var guideLabel = UILabel() | ||
.then { | ||
$0.numberOfLines = 0 | ||
$0.text = "네트워크에 접속할 수 없습니다.\n네트워크 연결 상태를 확인해주세요!" | ||
$0.textAlignment = .center | ||
$0.font = .pretendard(.semibold, ofSize: 18) | ||
$0.textColor = .gray02 | ||
} | ||
lazy var retryButton = UIButton() | ||
.then { | ||
$0.setTitle("재시도", for: .normal) | ||
$0.titleLabel?.font = .pretendard(.semibold, ofSize: 16) | ||
$0.layer.masksToBounds = true | ||
$0.layer.cornerRadius = 20 | ||
$0.backgroundColor = .primary | ||
} | ||
|
||
// MARK: - Initialization | ||
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
|
||
render() | ||
} | ||
|
||
@available(*, unavailable) | ||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
// MARK: - Functions | ||
|
||
private func render() { | ||
addSubViews([failImageView, guideLabel, retryButton]) | ||
|
||
self.snp.makeConstraints { make in | ||
make.width.equalTo(390) | ||
make.height.equalTo(401) | ||
} | ||
failImageView.snp.makeConstraints { make in | ||
make.centerX.equalToSuperview() | ||
make.width.height.equalTo(250) | ||
} | ||
guideLabel.snp.makeConstraints { make in | ||
make.top.equalTo(failImageView.snp.bottom).offset(24) | ||
make.centerX.equalToSuperview() | ||
} | ||
retryButton.snp.makeConstraints { make in | ||
make.top.equalTo(guideLabel.snp.bottom).offset(40) | ||
make.centerX.bottom.equalToSuperview() | ||
make.width.equalTo(120) | ||
make.height.equalTo(46) | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.