From f19911abcb4bee432eac79caac51faa2fdfb1829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E7=8E=AE?= Date: Wed, 31 Jan 2018 19:54:28 +0800 Subject: [PATCH] =?UTF-8?q?Update=EF=BC=9A=E4=BF=AE=E6=94=B9RecordHUD?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MCChatHUD/MCChatHUD/View/MCRecordHUD.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/MCChatHUD/MCChatHUD/View/MCRecordHUD.swift b/MCChatHUD/MCChatHUD/View/MCRecordHUD.swift index ae81a7b..37e3ba4 100644 --- a/MCChatHUD/MCChatHUD/View/MCRecordHUD.swift +++ b/MCChatHUD/MCChatHUD/View/MCRecordHUD.swift @@ -29,8 +29,9 @@ class MCRecordHUD: UIView { } //MARK: - Init - override init(frame: CGRect) { - super.init(frame: frame) + + convenience init() { + self.init(frame: .zero) self.frame.size.width = HUDWidth self.frame.size.height = HUDHeight center = CGPoint(x: ScreenWidth/2, y: ScreenHeight/2 - 50) @@ -42,6 +43,10 @@ class MCRecordHUD: UIView { setUpShadow() } + override private init(frame: CGRect) { + super.init(frame: frame) + } + required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") }