소스 검색

添加阴影效果

jsonwang 3 년 전
부모
커밋
ae4c8c4645
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      BFRecordScreenKit/Classes/RecordScreen/Controller/BFRecordScreenController.swift

+ 8 - 0
BFRecordScreenKit/Classes/RecordScreen/Controller/BFRecordScreenController.swift

@@ -279,6 +279,10 @@ public class BFRecordScreenController: BFBaseViewController {
         let btn = UIButton(type: .custom)
         btn.setBackgroundImage(imageInRecordScreenKit(by: "subtitleBtn_on"), for: .normal)
         btn.addTarget(self, action: #selector(subTitleClick), for: .touchUpInside)
+        btn.layer.shadowColor = UIColor.black.cgColor;
+        btn.layer.shadowOffset = CGSize.init(width: 0, height: 1.5)
+        btn.layer.shadowRadius = 3;
+        btn.layer.shadowOpacity = 0.3;
         btn.setTitle("function_subtitle".BFLocale, for: .normal)
         btn.titleLabel?.font = UIFont.systemFont(ofSize: 12, weight: .medium)
         btn.imagePosition(at: PQButtonImageEdgeInsetsStyle.top, space:10)
@@ -294,6 +298,10 @@ public class BFRecordScreenController: BFBaseViewController {
         btn.setTitleColor(UIColor.white, for: .normal)
         btn.setTitle("function_voice".BFLocale, for: .normal)
         btn.titleLabel?.font = UIFont.systemFont(ofSize: 12, weight: .medium)
+        btn.layer.shadowColor = UIColor.black.cgColor;
+        btn.layer.shadowOffset = CGSize.init(width: 0, height: 1.5)
+        btn.layer.shadowRadius = 3;
+        btn.layer.shadowOpacity = 0.3;
         btn.imagePosition(at: PQButtonImageEdgeInsetsStyle.top, space:10)
         btn.titleLabel?.adjustsFontSizeToFitWidth = true
         return btn