Commit 6753ddf5 authored by pete谢兆麟's avatar pete谢兆麟

登录页面

parent ea061a49
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
04FAC5452B32BA7000D24B36 /* YHMyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FAC5442B32BA7000D24B36 /* YHMyViewController.swift */; }; 04FAC5452B32BA7000D24B36 /* YHMyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FAC5442B32BA7000D24B36 /* YHMyViewController.swift */; };
04FAC54A2B32CF1000D24B36 /* YHNetRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FAC5492B32CF1000D24B36 /* YHNetRequest.swift */; }; 04FAC54A2B32CF1000D24B36 /* YHNetRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FAC5492B32CF1000D24B36 /* YHNetRequest.swift */; };
04FAC54D2B3A9E3D00D24B36 /* YHConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FAC54C2B3A9E3D00D24B36 /* YHConfig.swift */; }; 04FAC54D2B3A9E3D00D24B36 /* YHConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FAC54C2B3A9E3D00D24B36 /* YHConfig.swift */; };
04FAC54F2B3AA6EC00D24B36 /* YHLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FAC54E2B3AA6EC00D24B36 /* YHLoginViewController.swift */; };
04FAC5512B3ABA5000D24B36 /* YHLoginStyleButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FAC5502B3ABA5000D24B36 /* YHLoginStyleButton.swift */; };
04FAC5532B3AC6F200D24B36 /* YHLoginPrivacyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FAC5522B3AC6F200D24B36 /* YHLoginPrivacyView.swift */; };
6203A87EDC96313BBE789D9C /* Pods_galaxy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */; }; 6203A87EDC96313BBE789D9C /* Pods_galaxy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */; };
A52DF0BB2B330A20006618D6 /* YHAllApiName.swift in Sources */ = {isa = PBXBuildFile; fileRef = A52DEEAA2B330A1F006618D6 /* YHAllApiName.swift */; }; A52DF0BB2B330A20006618D6 /* YHAllApiName.swift in Sources */ = {isa = PBXBuildFile; fileRef = A52DEEAA2B330A1F006618D6 /* YHAllApiName.swift */; };
A52DF0BC2B330A20006618D6 /* YHNetworkStatusManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A52DEEAB2B330A1F006618D6 /* YHNetworkStatusManager.swift */; }; A52DF0BC2B330A20006618D6 /* YHNetworkStatusManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A52DEEAB2B330A1F006618D6 /* YHNetworkStatusManager.swift */; };
...@@ -84,6 +87,9 @@ ...@@ -84,6 +87,9 @@
04FAC5442B32BA7000D24B36 /* YHMyViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyViewController.swift; sourceTree = "<group>"; }; 04FAC5442B32BA7000D24B36 /* YHMyViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyViewController.swift; sourceTree = "<group>"; };
04FAC5492B32CF1000D24B36 /* YHNetRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHNetRequest.swift; sourceTree = "<group>"; }; 04FAC5492B32CF1000D24B36 /* YHNetRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHNetRequest.swift; sourceTree = "<group>"; };
04FAC54C2B3A9E3D00D24B36 /* YHConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHConfig.swift; sourceTree = "<group>"; }; 04FAC54C2B3A9E3D00D24B36 /* YHConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHConfig.swift; sourceTree = "<group>"; };
04FAC54E2B3AA6EC00D24B36 /* YHLoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLoginViewController.swift; sourceTree = "<group>"; };
04FAC5502B3ABA5000D24B36 /* YHLoginStyleButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLoginStyleButton.swift; sourceTree = "<group>"; };
04FAC5522B3AC6F200D24B36 /* YHLoginPrivacyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLoginPrivacyView.swift; sourceTree = "<group>"; };
58C2405158A4A6632D0E7460 /* Pods-galaxy.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-galaxy.debug.xcconfig"; path = "Target Support Files/Pods-galaxy/Pods-galaxy.debug.xcconfig"; sourceTree = "<group>"; }; 58C2405158A4A6632D0E7460 /* Pods-galaxy.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-galaxy.debug.xcconfig"; path = "Target Support Files/Pods-galaxy/Pods-galaxy.debug.xcconfig"; sourceTree = "<group>"; };
987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_galaxy.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_galaxy.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A52DEEAA2B330A1F006618D6 /* YHAllApiName.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHAllApiName.swift; sourceTree = "<group>"; }; A52DEEAA2B330A1F006618D6 /* YHAllApiName.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHAllApiName.swift; sourceTree = "<group>"; };
...@@ -167,6 +173,8 @@ ...@@ -167,6 +173,8 @@
children = ( children = (
04F526AE2B32D4B600FC6CE6 /* YHPersonalCenterCell.swift */, 04F526AE2B32D4B600FC6CE6 /* YHPersonalCenterCell.swift */,
04F526C02B3A657000FC6CE6 /* YHValidateCodeInputView.swift */, 04F526C02B3A657000FC6CE6 /* YHValidateCodeInputView.swift */,
04FAC5502B3ABA5000D24B36 /* YHLoginStyleButton.swift */,
04FAC5522B3AC6F200D24B36 /* YHLoginPrivacyView.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -213,6 +221,7 @@ ...@@ -213,6 +221,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
04FAC5442B32BA7000D24B36 /* YHMyViewController.swift */, 04FAC5442B32BA7000D24B36 /* YHMyViewController.swift */,
04FAC54E2B3AA6EC00D24B36 /* YHLoginViewController.swift */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -623,6 +632,7 @@ ...@@ -623,6 +632,7 @@
A52DF2372B330A21006618D6 /* YHTabBarViewController.swift in Sources */, A52DF2372B330A21006618D6 /* YHTabBarViewController.swift in Sources */,
A52DF0C22B330A20006618D6 /* AppDelegate + UIAppearance.swift in Sources */, A52DF0C22B330A20006618D6 /* AppDelegate + UIAppearance.swift in Sources */,
A52DF2352B330A21006618D6 /* YHNavigationController.swift in Sources */, A52DF2352B330A21006618D6 /* YHNavigationController.swift in Sources */,
04FAC5512B3ABA5000D24B36 /* YHLoginStyleButton.swift in Sources */,
A52DF0C52B330A20006618D6 /* UIDevice-Extension.swift in Sources */, A52DF0C52B330A20006618D6 /* UIDevice-Extension.swift in Sources */,
A5573ED22B317BFF00D98EC0 /* AppDelegate.swift in Sources */, A5573ED22B317BFF00D98EC0 /* AppDelegate.swift in Sources */,
04FAC54A2B32CF1000D24B36 /* YHNetRequest.swift in Sources */, 04FAC54A2B32CF1000D24B36 /* YHNetRequest.swift in Sources */,
...@@ -631,6 +641,8 @@ ...@@ -631,6 +641,8 @@
A52DF0C92B330A20006618D6 /* AlignedCollectionViewFlowLayout.swift in Sources */, A52DF0C92B330A20006618D6 /* AlignedCollectionViewFlowLayout.swift in Sources */,
A52DF0BC2B330A20006618D6 /* YHNetworkStatusManager.swift in Sources */, A52DF0BC2B330A20006618D6 /* YHNetworkStatusManager.swift in Sources */,
A52DF0CA2B330A20006618D6 /* UIViewController+Navigation.swift in Sources */, A52DF0CA2B330A20006618D6 /* UIViewController+Navigation.swift in Sources */,
04FAC5532B3AC6F200D24B36 /* YHLoginPrivacyView.swift in Sources */,
04FAC54F2B3AA6EC00D24B36 /* YHLoginViewController.swift in Sources */,
A52DF0C12B330A20006618D6 /* UIButton-Extension.swift in Sources */, A52DF0C12B330A20006618D6 /* UIButton-Extension.swift in Sources */,
A52DF0CF2B330A20006618D6 /* String-Extension.swift in Sources */, A52DF0CF2B330A20006618D6 /* String-Extension.swift in Sources */,
A52DF2402B3316A0006618D6 /* YHBouncesContentView.swift in Sources */, A52DF2402B3316A0006618D6 /* YHBouncesContentView.swift in Sources */,
......
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "login_bg_image@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "login_bg_image@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
This image diff could not be displayed because it is too large. You can view the blob instead.
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "login_center_image@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "login_center_image@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "login_privacy_agree@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "login_privacy_agree@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "login_privacy_disagree@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "login_privacy_disagree@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "login_style_email@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "login_style_email@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "login_style_message@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "login_style_message@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "login_style_wx@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "login_style_wx@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -104,7 +104,7 @@ func kIsEmpty(string: String) -> Bool { ...@@ -104,7 +104,7 @@ func kIsEmpty(string: String) -> Bool {
* parameter name 字体名字 (为空时默认字体) * parameter name 字体名字 (为空时默认字体)
* parameter size 字体大小 * parameter size 字体大小
*/ */
func kFont(name: String, size: CGFloat) -> UIFont { func kFont(name: String = "", size: CGFloat) -> UIFont {
if !kIsEmpty(string: name) { if !kIsEmpty(string: name) {
return UIFont.init(name: name, size: size)! return UIFont.init(name: name, size: size)!
}else { }else {
...@@ -112,6 +112,14 @@ func kFont(name: String, size: CGFloat) -> UIFont { ...@@ -112,6 +112,14 @@ func kFont(name: String, size: CGFloat) -> UIFont {
} }
} }
func kBoldFont(name: String = "", size: CGFloat) -> UIFont {
if !kIsEmpty(string: name) {
return UIFont.init(name: name, size: size)!
}else {
return UIFont.boldSystemFont(ofSize: size)
}
}
/// 版本号相同: /// 版本号相同:
func systemVersionEqual(version:String) -> Bool { func systemVersionEqual(version:String) -> Bool {
return UIDevice.current.systemVersion == version return UIDevice.current.systemVersion == version
......
//
// YHLoginViewController.swift
// galaxy
//
// Created by EDY on 2023/12/26.
//
import UIKit
import SnapKit
class YHLoginViewController: YHBaseViewController {
var bgImageView: UIImageView!
var loginTitleLabel: UILabel!
var loginSubTitleLabel: UILabel!
var loginPhoneLabel: UILabel!
var loginButton: UIButton!
var messageButton: YHLoginStyleButton!
var emailButton: YHLoginStyleButton!
var centerLine: UIView!
var centerImageView: UIImageView!
var promptsLabel: UILabel!
var wxButton: UIButton!
var privacyView: YHLoginPrivacyView!
override func viewDidLoad() {
super.viewDidLoad()
setView()
// Do any additional setup after loading the view.
}
func setView() {
bgImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "login_bg_image")
return imageView
}()
view.addSubview(bgImageView)
bgImageView.snp.makeConstraints { make in
make.left.right.top.bottom.equalTo(view)
}
loginTitleLabel = {
let label = UILabel()
label.text = "登录后更精彩"
label.font = kBoldFont(size: 32)
label.textColor = YHColorWithHex(0xffffff)
return label
}()
view.addSubview(loginTitleLabel)
loginTitleLabel.snp.makeConstraints { make in
make.left.equalTo(14)
make.right.equalTo(-14)
make.top.equalTo(111)
make.height.equalTo(39)
}
loginSubTitleLabel = {
let label = UILabel()
label.text = "香港美好生活期待与你的相遇"
label.font = kFont(size: 20)
label.textColor = YHColorWithHex(0xffffff)
return label
}()
view.addSubview(loginSubTitleLabel)
loginSubTitleLabel.snp.makeConstraints { make in
make.left.equalTo(14)
make.right.equalTo(-14)
make.top.equalTo(159)
make.height.equalTo(24)
}
loginPhoneLabel = {
let label = UILabel()
label.text = "+86 133****3800"
label.font = kBoldFont(size: 20)
label.textAlignment = .center
label.textColor = YHColorWithHex(0xffffff)
return label
}()
view.addSubview(loginPhoneLabel)
loginPhoneLabel.snp.makeConstraints { make in
make.left.equalTo(14)
make.right.equalTo(-14)
make.top.equalTo(245)
make.height.equalTo(24)
}
loginButton = {
let button = UIButton(type: .custom)
button.backgroundColor = YHColorWithHex(0x4d9ff8)
button.titleLabel?.font = kBoldFont(size: 16)
button.contentHorizontalAlignment = .center
button.setTitle("本机号码一键登录", for: .normal)
button.setTitleColor(YHColorWithHex(0xffffff), for: .normal)
button.layer.cornerRadius = 24
return button
}()
view.addSubview(loginButton)
loginButton.snp.makeConstraints { make in
make.left.equalTo(21)
make.right.equalTo(-21)
make.top.equalTo(289)
make.height.equalTo(48)
}
centerLine = {
let view = UIView()
view.backgroundColor = YHColorWithHex(0xffffff)
return view
}()
view.addSubview(centerLine)
centerLine.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.top.equalTo(368)
make.height.equalTo(20)
make.width.equalTo(1)
}
messageButton = {
let button = YHLoginStyleButton()
button.setContent(image: UIImage(named: "login_style_message")!, message: "验证码登录")
return button
}()
view.addSubview(messageButton)
messageButton.snp.makeConstraints { make in
make.right.equalTo(centerLine.snp.left).offset(-10)
make.centerY.equalTo(centerLine)
make.height.equalTo(20)
make.width.equalTo(110)
}
emailButton = {
let button = YHLoginStyleButton()
button.setContent(image: UIImage(named: "login_style_email")!, message: "邮箱登录")
return button
}()
view.addSubview(emailButton)
emailButton.snp.makeConstraints { make in
make.left.equalTo(centerLine.snp.right).offset(10)
make.centerY.equalTo(centerLine)
make.height.equalTo(20)
make.width.equalTo(93)
}
centerImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "login_center_image")
return imageView
}()
view.addSubview(centerImageView)
centerImageView.snp.makeConstraints { make in
make.centerX.equalTo(view)
make.width.equalTo(153)
make.height.equalTo(108)
make.bottom.equalTo(-188)
}
promptsLabel = {
let label = UILabel()
label.text = "其他登录方式(第三方账号注册需绑定手机号)"
label.font = kFont(size: 12)
label.textColor = YHColorWithHex(0xffffff)
label.textAlignment = .center
return label
}()
view.addSubview(promptsLabel)
promptsLabel.snp.makeConstraints { make in
make.left.equalTo(14)
make.right.equalTo(-14)
make.bottom.equalTo(-89)
make.height.equalTo(20)
}
wxButton = {
let button = UIButton(type: .custom)
button.setBackgroundImage(UIImage(named: "login_style_wx"), for: .normal)
return button
}()
view.addSubview(wxButton)
wxButton.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.bottom.equalTo(-59)
make.height.equalTo(18)
make.width.equalTo(21)
}
privacyView = {
let view = YHLoginPrivacyView()
return view
}()
view.addSubview(privacyView)
privacyView.snp.makeConstraints { make in
make.bottom.equalTo(-24)
make.centerX.equalToSuperview()
make.height.equalTo(20)
make.width.equalTo(308)
}
}
}
...@@ -79,4 +79,9 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource { ...@@ -79,4 +79,9 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 50 return 50
} }
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let vc = YHLoginViewController()
self.navigationController?.pushViewController(vc)
}
} }
//
// YHLoginPrivacyView.swift
// galaxy
//
// Created by EDY on 2023/12/26.
//
import UIKit
class YHLoginPrivacyView: UIView {
var agreeButton: UIButton!
var messageLabel: UILabel!
var serviceButton: UIButton!
var andLabel: UILabel!
var privacyButton: UIButton!
override init(frame: CGRect) {
super.init(frame: frame)
setView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setView() {
agreeButton = {
let button = UIButton(type: .custom)
button.setBackgroundImage(UIImage(named: "login_privacy_disagree"), for: .normal)
button.setBackgroundImage(UIImage(named: "login_privacy_agree"), for: .selected)
return button
}()
addSubview(agreeButton)
agreeButton.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalToSuperview()
make.height.equalTo(12)
make.width.equalTo(12)
}
messageLabel = {
let label = UILabel()
label.text = "我已阅读并同意"
label.font = kFont(size: 12)
label.textColor = YHColorWithHex(0xffffff)
label.textAlignment = .left
return label
}()
addSubview(messageLabel)
messageLabel.snp.makeConstraints { make in
make.left.equalTo(agreeButton.snp.right).offset(10)
make.centerY.equalToSuperview()
make.height.equalTo(20)
}
serviceButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = kBoldFont(size: 12)
button.contentHorizontalAlignment = .center
button.setTitle("《银河服务条款》", for: .normal)
return button
}()
addSubview(serviceButton)
serviceButton.snp.makeConstraints { make in
make.left.equalTo(messageLabel.snp.right).offset(1)
make.centerY.equalToSuperview()
make.height.equalTo(20)
make.width.equalTo(96)
}
andLabel = {
let label = UILabel()
label.text = "和"
label.font = kFont(size: 12)
label.textColor = YHColorWithHex(0xffffff)
label.textAlignment = .left
return label
}()
addSubview(andLabel)
andLabel.snp.makeConstraints { make in
make.left.equalTo(serviceButton.snp.right).offset(1)
make.centerY.equalToSuperview()
make.height.equalTo(20)
}
privacyButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = kBoldFont(size: 12)
button.contentHorizontalAlignment = .center
button.setTitle("《银河隐私政策》", for: .normal)
return button
}()
addSubview(privacyButton)
privacyButton.snp.makeConstraints { make in
make.left.equalTo(andLabel.snp.right).offset(1)
make.centerY.equalToSuperview()
make.height.equalTo(20)
make.width.equalTo(96)
}
}
}
//
// YHLoginStyleButton.swift
// galaxy
//
// Created by EDY on 2023/12/26.
//
import UIKit
class YHLoginStyleButton: UIButton {
var messageLabel: UILabel!
var headImageView: UIImageView!
override init(frame: CGRect) {
super.init(frame: frame)
setView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setView() {
headImageView = {
let imageView = UIImageView()
return imageView
}()
addSubview(headImageView)
headImageView.snp.makeConstraints { make in
make.left.top.bottom.equalToSuperview()
make.width.equalTo(18)
}
messageLabel = {
let label = UILabel()
label.font = kBoldFont(size: 16)
label.textColor = YHColorWithHex(0xffffff)
label.textAlignment = .right
return label
}()
addSubview(messageLabel)
messageLabel.snp.makeConstraints { make in
make.right.top.bottom.equalToSuperview()
make.left.equalTo(20)
}
}
func setContent(image: UIImage, message: String) {
headImageView.image = image
messageLabel.text = message
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment