-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update empty & error screens to have background behind empty & error …
…states logos (#421) * added background * fixes * fix * added space * fix spacing * remove error and empty states * remove blurred background view * remove mock data * fix font
- Loading branch information
Showing
12 changed files
with
183 additions
and
127 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
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
52 changes: 52 additions & 0 deletions
52
novawallet/Modules/Crowdloan/CrowdloanList/View/CrowdloanEmptyView.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,52 @@ | ||
import UIKit | ||
|
||
final class CrowdloanEmptyView: UIView { | ||
var verticalSpacing: CGFloat = 8.0 { | ||
didSet { | ||
stackView.spacing = verticalSpacing | ||
} | ||
} | ||
|
||
let imageView = UIImageView() | ||
|
||
let titleLabel: UILabel = .create { | ||
$0.numberOfLines = 0 | ||
$0.textAlignment = .center | ||
$0.backgroundColor = .clear | ||
$0.textColor = R.color.colorWhite64() | ||
$0.font = .p2Paragraph | ||
} | ||
|
||
private lazy var stackView = UIStackView(arrangedSubviews: [ | ||
imageView, | ||
titleLabel | ||
]) | ||
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
|
||
backgroundColor = .clear | ||
setupLayout() | ||
} | ||
|
||
@available(*, unavailable) | ||
required init?(coder _: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
private func setupLayout() { | ||
stackView.axis = .vertical | ||
stackView.alignment = .center | ||
stackView.spacing = verticalSpacing | ||
|
||
addSubview(stackView) | ||
stackView.snp.makeConstraints { | ||
$0.edges.equalToSuperview() | ||
} | ||
} | ||
|
||
func bind(image: UIImage?, text: String?) { | ||
imageView.image = image | ||
titleLabel.text = text | ||
} | ||
} |
Oops, something went wrong.