TIA
解决方法 请使用MBProgressHUD.#import <UIKit/UIKit.h>;#import "MBProgressHUD.h" // import the .h file into project.@class MBProgressHudDemoVIEwController;@interface MBProgressHudDemoAppDelegate : NSObject <UIApplicationDelegate,MBProgressHUDDelegate> { UIWindow *window; MBProgressHudDemoVIEwController *vIEwController; MBProgressHUD *HUD;// create the object of Hud.}@property (nonatomic,retain) IBOutlet UIWindow *window;@property (nonatomic,retain) IBOutlet MBProgressHudDemoVIEwController *vIEwController;-(voID)showProgressHUD:(Nsstring*)msg;-(voID)hIDeProgressHUD;@end#import <UIKit/UIKit.h>#import "MBProgressHudDemoAppDelegate.h"@interface MBProgressHudDemoVIEwController : UIVIEwController { MBProgressHudDemoAppDelegate *delegate;}@end
VIEwControll.m文件
#import "MBProgressHudDemoVIEwController.h"#import "MBProgressHudDemoAppDelegate.h"@implementation MBProgressHudDemoVIEwController// Implement vIEwDIDLoad to do additional setup after loading the vIEw,typically from a nib.- (voID)vIEwDIDLoad { [super vIEwDIDLoad]; [self performSelector:@selector(nextDetail) withObject:nil afterDelay:2]; }-(voID)nextDetail{ delegate = (MBProgressHudDemoAppDelegate*)[[UIApplication sharedApplication] delegate]; [delegate showProgressHUD:@"Please Wait..."]; [self performSelector:@selector(RemoveHud) withObject:nil afterDelay:2]; }-(voID)RemoveHud{ [delegate hIDeProgressHUD];}@end
产量
总结以上是内存溢出为你收集整理的iphone – 如何在视图中显示加载动画 – IOS全部内容,希望文章能够帮你解决iphone – 如何在视图中显示加载动画 – IOS所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)