// // MBProgressHUDHelper.m // FirstLink // // Created by unicode on 14-10-20. // Copyright (c) 2014年 FirstLink. All rights reserved. // #import "FLProgressHUDHelper.h" @implementation FLProgressHUDHelper + (void)showText:(NSString *)text inView:(UIView *)view { if (!text || text.length == 0 || !view) { return; } MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES]; // Configure for text only and offset down hud.mode = MBProgressHUDModeText; hud.detailsLabelText = text; hud.detailsLabelFont = [UIFont systemFontOfSize:16]; hud.margin = 10.f; hud.removeFromSuperViewOnHide = YES; hud.animationType = MBProgressHUDAnimationZoomOut; hud.userInteractionEnabled = NO; [hud show:YES]; [hud hide:YES afterDelay:2]; } + (void)showTipAlert:(NSString *)text { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"" message:text delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil]; [alert show]; } + (void)showCustomView:(UIView *)customView inView:(UIView *)view withComplitionBlock:(void(^)(void))complition{ if (!customView || !view) return; MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES]; hud.mode = MBProgressHUDModeCustomView; hud.customView = customView; hud.completionBlock = complition; [hud show:YES]; [hud hide:NO afterDelay:2]; } @end