简体   繁体   中英

Black temporary alert box in iOS

I need a black temporary transparent box that must show something like "Loading...." with a spinner it. We can see such a view in twitter when "Tweeting" an update - it says "Sending tweet..." kinda thing.

Is this an inbuilt behavior in UIKit. How do I get this box to show up on screen for a few seconds and disappear.

please help.

You need to use DSActivityView . All this is handled there. Instead of doing your own thing I suggest you use this.

For what you need this is how you need to go -

#import "DSActivityView.h"

[DSActivityView activityViewForView:self.view withLabel:@"Tweeting"]; //to show spinner with label

[DSActivityView removeView]; //once its done

您也可以尝试使用MBProgressHud

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM