From d1780b53c72799520f5ac0d577a6b072df9421be Mon Sep 17 00:00:00 2001 From: JohnLui Date: Fri, 15 May 2015 21:12:31 +0800 Subject: [PATCH] great progress: bug fix on presentViewController. add text notice on StatusBar. --- README.md | 7 +- SwiftNotice.swift | 76 +++++++++++++----- .../UserInterfaceState.xcuserstate | Bin 18956 -> 23401 bytes .../xcdebugger/Breakpoints_v2.xcbkptlist | 5 ++ .../Base.lproj/Main.storyboard | 34 +++++--- .../SwiftNoticeExample/ViewController.swift | 3 + 6 files changed, 90 insertions(+), 35 deletions(-) create mode 100644 SwiftNoticeExample/SwiftNoticeExample.xcodeproj/xcuserdata/dren_a.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist diff --git a/README.md b/README.md index 321afdf..ef892c7 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ SwiftNotice is a GUI library for displaying various popups written in pure Swift ##Features -![SwiftNotice gif](http://staticonsae.sinaapp.com/images/SwiftNotice2.gif) +![SwiftNotice gif](http://staticonsae.sinaapp.com/images/SwiftNotice3.gif) ##Pretty easy to use @@ -13,6 +13,8 @@ In any subclass of UIViewController: ```swift self.pleaseWait() +self.noticeTop("转发成功!") + self.successNotice("Success!") self.errorNotice("Error!") self.infoNotice("Info") @@ -31,8 +33,7 @@ Just clone and add `SwiftNotice.swift` to your project. ##Requirements * iOS 7.0+ -* Xcode 6.3 -* Swift 1.2 +* Xcode 6.3 (Swift 1.2) ##Contribution diff --git a/SwiftNotice.swift b/SwiftNotice.swift index cb1faca..92c625c 100644 --- a/SwiftNotice.swift +++ b/SwiftNotice.swift @@ -10,6 +10,12 @@ import Foundation import UIKit extension UIViewController { + func noticeTop(text: String) { + SwiftNotice.noticeOnSatusBar(text, autoClear: true) + } + func noticeTop(text: String, autoClear: Bool) { + SwiftNotice.noticeOnSatusBar(text, autoClear: autoClear) + } func successNotice(text: String) { SwiftNotice.showNoticeWithText(NoticeType.success, text: text, autoClear: true) } @@ -50,17 +56,40 @@ enum NoticeType{ class SwiftNotice: NSObject { - static var mainViews = Array() + static var windows = Array() static let rv = UIApplication.sharedApplication().keyWindow?.subviews.first as! UIView static func clear() { - for i in mainViews { - i.removeFromSuperview() - } + windows.removeAll(keepCapacity: false) } + static func noticeOnSatusBar(text: String, autoClear: Bool) { + let frame = UIApplication.sharedApplication().statusBarFrame + let window = UIWindow(frame: frame) + let view = UIView(frame: frame) + view.backgroundColor = UIColor(red: 0x6a/0x100, green: 0xb4/0x100, blue: 0x9f/0x100, alpha: 1) + + let label = UILabel(frame: frame) + label.textAlignment = NSTextAlignment.Center + label.font = UIFont.systemFontOfSize(12) + label.textColor = UIColor.whiteColor() + label.text = text + view.addSubview(label) + + window.windowLevel = UIWindowLevelStatusBar + window.hidden = false + window.addSubview(view) + windows.append(window) + + if autoClear { + let selector = Selector("hideNotice:") + self.performSelector(selector, withObject: view, afterDelay: 1) + } + } static func wait() { - let mainView = UIView(frame: CGRectMake(0, 0, 78, 78)) + let frame = CGRectMake(0, 0, 78, 78) + let window = UIWindow(frame: frame) + let mainView = UIView(frame: frame) mainView.layer.cornerRadius = 12 mainView.backgroundColor = UIColor(red:0, green:0, blue:0, alpha: 0.8) @@ -69,14 +98,15 @@ class SwiftNotice: NSObject { ai.startAnimating() mainView.addSubview(ai) - mainView.center = rv.center - rv.addSubview(mainView) - - mainViews.append(mainView) + window.windowLevel = UIWindowLevelAlert + window.center = rv.center + window.hidden = false + window.addSubview(mainView) + windows.append(window) } - static func showText(text: String) { let frame = CGRectMake(0, 0, 200, 60) + let window = UIWindow(frame: frame) let mainView = UIView(frame: frame) mainView.layer.cornerRadius = 12 mainView.backgroundColor = UIColor(red:0, green:0, blue:0, alpha: 0.8) @@ -88,14 +118,17 @@ class SwiftNotice: NSObject { label.textColor = UIColor.whiteColor() mainView.addSubview(label) - mainView.center = rv.center - rv.addSubview(mainView) - - mainViews.append(mainView) + window.windowLevel = UIWindowLevelAlert + window.center = rv.center + window.hidden = false + window.addSubview(mainView) + windows.append(window) } static func showNoticeWithText(type: NoticeType,text: String, autoClear: Bool) { - var mainView = UIView(frame: CGRectMake(0, 0, 90, 90)) + let frame = CGRectMake(0, 0, 90, 90) + let window = UIWindow(frame: frame) + let mainView = UIView(frame: frame) mainView.layer.cornerRadius = 10 mainView.backgroundColor = UIColor(red:0, green:0, blue:0, alpha: 0.7) @@ -120,12 +153,13 @@ class SwiftNotice: NSObject { label.text = text label.textAlignment = NSTextAlignment.Center mainView.addSubview(label) - - mainView.center = rv.center - rv.addSubview(mainView) - - mainViews.append(mainView) - + + window.windowLevel = UIWindowLevelAlert + window.center = rv.center + window.hidden = false + window.addSubview(mainView) + windows.append(window) + if autoClear { let selector = Selector("hideNotice:") self.performSelector(selector, withObject: mainView, afterDelay: 3) diff --git a/SwiftNoticeExample/SwiftNoticeExample.xcodeproj/project.xcworkspace/xcuserdata/dren_a.xcuserdatad/UserInterfaceState.xcuserstate b/SwiftNoticeExample/SwiftNoticeExample.xcodeproj/project.xcworkspace/xcuserdata/dren_a.xcuserdatad/UserInterfaceState.xcuserstate index 65dc8e1049ab518964a82e0b7920851e64411798..c656ca45c9828a780e2a005a6c6eb89981e1315b 100644 GIT binary patch literal 23401 zcmc(H2Yi!N*Z959N*8T9Xu4<8-DY;ul_qWJV3tv4N!!o{+NLBaQ{+CPxEG2DqS7)H z6bFbR`Z{o-qM{5%kRggVKyjb~>i;}>lC*)M-}`;<_y73)fc8FjoO{l>XW!f0-C?mi zRI2?5BMQ-oK`i1VM8Y@9=bCMHi?yp!Zf%}rZgJQr$xXJFb_+C*lRK>4AqX#9`(!Yc zha|`cg`zMt6s4jxl#Vh`CdxwDCoOUP3RU zx6p3%HhKr`MF-Il^f@|-zChogvzWsY?1O!=ANI!qcnA)}L0F2zu?$D!M6AH+SdBGU ziwkinuEN#07LUSX@dP{xPsP)53$|ki?!j~MJUkySz&GPt@U8eZd^^4a--++VEAV}I zHGT*`iZ|h>@U!?i`~rR%7vNX$>v%VQ8^43!#~n37OKsG(FiC8Of01S*kAr!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+|jOg0vgV7gb zP>du-9;1v=#i(PnF{v@xF)dW#Vot@JjX59lRm^uWzZkw{MhBOD`Qv1 zu8(~;c1P^d*w16H#@>p3XcQU6#vr4_C^ssNdSi?+)@U*&7?X_2#;(R<<0Rue<3{5l zA2~v>9XmX>1Wdo({HBVO?OTA;#6^t zxRG(M$4!r08CMfmAGa=UL)@mgEpgl9cE)`ew>R!|+}XJEabLwWp%~#Don6H_CGXG}&!+g(t zKUtitNDfPmNY*6llE)>pI=L=+P4cGX9m&U%uO_>HO$ka-q@<;E zOzD%-H>F=nK}vDTn3T$tS5vA|UQd~lGA(6B%IuVRDV~(oDYYr}DeF=$r`$}ropLAT zZfbt&kkp~6!&8e>x2Nt;J(zkp^*@#bi^I~=(%RC-($3Ps(%q78>0{|<8DJS?8DSY? zsj|FjnPZt}@mLmG7F$+Z>fDyKmi3l*Et@PmE&DD1v3y~HsI}BuWqsZ1wobB6u}-xv zur9JLu`ah^o7ASY>1@$9gUx7*vnALZwq~|0TMJuDTWebzo4cJY&(_11Z|iLvYIE8~ z+D6&RY-4N_Y;K!in{4~ucH8#I_B0Kp(KP?Gz_gGwby`$fbXsg$Tv}pUa$0IyPTIh< z^0ex->1m78cBSo4JCJrb?PS{5X;;#IO1qo(SK5QL$97;x_E5Xl9%YZVC)!i(nf7M( zYaaU99L*iA9c>*Q9335<9TOc(9ormx9PUpX#~hzJK6jjPoO68X_`z|*am#VX zao6$C@gxIgkPJ~qYQ~_9=^67gmS(({u_xnT#*vJp87DH%WSqTyH?6mCc>^9lC*?qJ7XAjMGW*29dWLIRnvnORw$)1)yBYSrCylhYQ z>g?L=`s{TrBrP;8qFU%%7+MG|X1AEzVt$K-E!MR#Y;3X3*Cit4`xI#!+s?+17CZhA D8#zXF diff --git a/SwiftNoticeExample/SwiftNoticeExample.xcodeproj/xcuserdata/dren_a.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/SwiftNoticeExample/SwiftNoticeExample.xcodeproj/xcuserdata/dren_a.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..fe2b454 --- /dev/null +++ b/SwiftNoticeExample/SwiftNoticeExample.xcodeproj/xcuserdata/dren_a.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,5 @@ + + + diff --git a/SwiftNoticeExample/SwiftNoticeExample/Base.lproj/Main.storyboard b/SwiftNoticeExample/SwiftNoticeExample/Base.lproj/Main.storyboard index 1ff71fb..b9069ce 100644 --- a/SwiftNoticeExample/SwiftNoticeExample/Base.lproj/Main.storyboard +++ b/SwiftNoticeExample/SwiftNoticeExample/Base.lproj/Main.storyboard @@ -1,7 +1,7 @@ - + - + @@ -16,10 +16,10 @@ - + @@ -87,6 +97,8 @@ + + diff --git a/SwiftNoticeExample/SwiftNoticeExample/ViewController.swift b/SwiftNoticeExample/SwiftNoticeExample/ViewController.swift index 57ad1c1..f598d2b 100644 --- a/SwiftNoticeExample/SwiftNoticeExample/ViewController.swift +++ b/SwiftNoticeExample/SwiftNoticeExample/ViewController.swift @@ -20,6 +20,9 @@ class ViewController: UIViewController { // Dispose of any resources that can be recreated. } + @IBAction func topNotice(sender: AnyObject) { + self.noticeTop("转发成功!") + } @IBAction func wait(sender: AnyObject) { self.pleaseWait() }