SimpleHUD works on any iOS version and is compatible with swift.
Currently it has three modes:
- Unlimited
Default mode, but to set Unlimited again:
let hud = CPSimpleHUD.shareWaitingView
hud.waitingMode = .Unlimited
- SmallCubesLinear
To set SmallCubesLinear:
hud.waitingMode = .SmallCubesLinear
- SmallCubesBorders
To set SmallCubesLinear:
hud.waitingMode = .SmallCubesBorders
To show the HUD just:
CPSimpleHUD.shareWaitingView.show()
To show the HUD just:
CPSimpleHUD.shareWaitingView.hide()
The dark view in the background and the label are customisable.
You can change the autolayout rules of the darkview and as a result the interior cubes will change:
hud.heightDarkViewContraint.constant = 50;
hud.widthDarkViewContraint.constant = 50;
Frameworks required:
- Foundation.framework
- UIKit.framework
If you're gonna use it in swift code, just copy the CPSimpleHUD.swift file in your project.
If you're gonna use it in Objective-C:
- Copy CPSimpleHUDObjectiveCTypes too.
- Add the import to your umbrella file:
#import "CPSimpleHUDObjectiveCTypes.h"
- Add the import in your Objective-C file where you're gonna use it:
#import "ProjectName-Swift.h"
#import "CPSimpleHUDObjectiveCTypes.h"