Last active
April 9, 2016 15:56
-
-
Save pedantix/08e13b730b608a6c243496bb4d095055 to your computer and use it in GitHub Desktop.
Swift Activity View Mixin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//use whatever activity view makes you happy in this project we were converting from ObjC to Swift, #2016 | |
protocol ActivityVC: class { | |
var activityView: DejalBezelActivityView? { get set } | |
var view: UIView! { get } | |
} | |
extension ActivityVC { | |
mutating func activityStart() { | |
if activityView == nil { | |
activityView = DejalBezelActivityView(forView: view, withLabel: nil, width: 40) | |
} | |
activityView!.animateShow() | |
} | |
func activityStop() { | |
activityView?.animateRemove() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment