Christian
Christian

Reputation: 7429

Modal box confirming an action is done in swift

I am searching for something like the UiActivityView (A View that will be shown in the center, a little transparent) which just can hold a string saying "Saving Done"

I could do this my myself, but I am pretty sure something like this already exists but I can't find it..

By the way, i am using swift

Thanks

Upvotes: 0

Views: 404

Answers (2)

Deny
Deny

Reputation: 1461

Or you can try PKHUD. It's written in swift, but for iOS 8 only. You can use it as framework. And great tool for finding libraries in the future is swifttoolbox.com.

Upvotes: 0

Daniele
Daniele

Reputation: 2469

They are generally called HUD, there are many libraries that already offer this kind of functionality, one of the most known is MBProgressHUD

Sample code directly from their demo:

MBProgressHUD *HUD = [[MBProgressHUD alloc] initWithView:self.navigationController.view];
[self.navigationController.view addSubview:HUD];
HUD.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"checkMark.png"];
HUD.mode = MBProgressHUDModeCustomView;
HUD.labelText = @"Saving Done";
[HUD show:YES];
[HUD hide:YES afterDelay:2];

Here the final result for reference enter image description here

Upvotes: 1

Related Questions