|
@@ -21,9 +21,12 @@ class INRecorderController: BFBaseViewController {
|
|
|
|
|
|
lazy var addVideoBtn: UIButton = {
|
|
|
let btn = UIButton(type: .custom)
|
|
|
- // btn.setTitle("Add", for: .normal)
|
|
|
btn.setImage(UIImage(named: "add"), for: .normal)
|
|
|
+ btn.setTitle("从相册选择", for: .normal)
|
|
|
+ btn.setTitleColor(UIColor.init(white: 1, alpha: 0.5), for: .normal)
|
|
|
+ btn.titleLabel?.font = UIFont.systemFont(ofSize: 14)
|
|
|
btn.addTarget(self, action: #selector(addVideo), for: .touchUpInside)
|
|
|
+
|
|
|
return btn
|
|
|
}()
|
|
|
|
|
@@ -176,19 +179,24 @@ class INRecorderController: BFBaseViewController {
|
|
|
view.addSubview(buildTimeLabel)
|
|
|
}
|
|
|
|
|
|
- view.addSubview(centerView)
|
|
|
view.addSubview(bottomView)
|
|
|
+
|
|
|
+ view.addSubview(centerView)
|
|
|
centerView.snp.makeConstraints { make in
|
|
|
- make.width.equalTo(140)
|
|
|
+ make.width.equalToSuperview()
|
|
|
make.height.equalTo(209)
|
|
|
make.center.equalToSuperview()
|
|
|
}
|
|
|
|
|
|
- centerView.addSubview(addVideoBtn)
|
|
|
- addVideoBtn.snp.makeConstraints { make in
|
|
|
- make.top.equalToSuperview().offset(5)
|
|
|
- make.left.equalToSuperview().offset(5)
|
|
|
- make.width.height.equalTo(130)
|
|
|
+ centerView.addSubview(titleL)
|
|
|
+ centerView.addSubview(camaraBtn)
|
|
|
+ centerView.addSubview(photoBtn)
|
|
|
+
|
|
|
+ camaraBtn.snp.makeConstraints { make in
|
|
|
+ make.width.equalTo(130)
|
|
|
+ make.height.equalTo(180)
|
|
|
+ make.centerX.equalToSuperview().offset(-71.5)
|
|
|
+ make.centerY.equalToSuperview()
|
|
|
}
|
|
|
|
|
|
let l = UILabel()
|
|
@@ -202,15 +210,12 @@ class INRecorderController: BFBaseViewController {
|
|
|
paragraphStyle.lineSpacing = 7
|
|
|
paragraphStyle.alignment = .center
|
|
|
attributedString.addAttribute(.paragraphStyle, value: paragraphStyle, range: .init(location: 0, length: l.text?.count ?? 0))
|
|
|
-
|
|
|
- l.attributedText = attributedString
|
|
|
- l.sizeToFit()
|
|
|
- l.numberOfLines = 2
|
|
|
- l.snp.makeConstraints { make in
|
|
|
- make.top.equalTo(addVideoBtn.snp.bottom).offset(19)
|
|
|
+
|
|
|
+ titleL.snp.makeConstraints { make in
|
|
|
+ make.bottom.equalTo(photoBtn.snp.top).offset(-50)
|
|
|
make.centerX.equalToSuperview()
|
|
|
make.width.equalTo(200)
|
|
|
- make.height.equalTo(60)
|
|
|
+ make.height.equalTo(40)
|
|
|
}
|
|
|
|
|
|
//欢迎界面
|
|
@@ -265,6 +270,16 @@ class INRecorderController: BFBaseViewController {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ override func viewDidLayoutSubviews() {
|
|
|
+ var btn = camaraBtn
|
|
|
+ btn.imageEdgeInsets = UIEdgeInsets(top: -btn.titleLabel!.height - 2, left: 0, bottom: 0, right: -btn.titleLabel!.width)
|
|
|
+ btn.titleEdgeInsets = UIEdgeInsets(top: btn.imageView!.height + 8, left: -btn.imageView!.width, bottom: 0, right: 0)
|
|
|
+
|
|
|
+ btn = photoBtn
|
|
|
+ btn.imageEdgeInsets = UIEdgeInsets(top: -btn.titleLabel!.height - 2, left: 0, bottom: 0, right: -btn.titleLabel!.width)
|
|
|
+ btn.titleEdgeInsets = UIEdgeInsets(top: btn.imageView!.height + 8, left: -btn.imageView!.width, bottom: 0, right: 0)
|
|
|
+ }
|
|
|
+
|
|
|
@objc func doneAction() {
|
|
|
welcomeBackView.isHidden = true
|
|
|
|
|
@@ -297,6 +312,11 @@ class INRecorderController: BFBaseViewController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @objc func cameraBtnAction() {
|
|
|
+ let vc = INIntroduceController()
|
|
|
+ navigationController?.pushViewController(vc, animated: true)
|
|
|
+ }
|
|
|
+
|
|
|
@objc func protocolClick(sender:UIButton) {
|
|
|
var link: String?
|
|
|
if sender.tag == 1 {
|