사용자 구매 항목을 표시하려면 customView로 MBProgressHUD
을 표시하고 싶습니다. 여기 내가 시도한 것MBProgessHUD가 즉시 숨겨집니다. 최소 쇼 시간을 설정하는 방법?
- (void)showInfoAlert:(int)clues {
UIWindow *window = [[[UIApplication sharedApplication] windows] lastObject];
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:window animated:YES];
hud.customView = [[[UIImageView alloc] initWithImage:
[UIImage imageNamed:@"tick.png"]] autorelease];
hud.mode = MBProgressHUDModeCustomView;
hud.dimBackground = YES;
NSString* msg = (clues == 1) ? @"1 Clue added to yor account." : [NSString stringWithFormat:@"%d Clues added to yor account.", clues];
hud.labelText = msg;
[hud showAnimated:YES whileExecutingBlock:^(void){
[NSThread sleepForTimeInterval:3];
}];
}
hud가 매우 짧은 시간 동안 표시되고 즉시 숨겨집니다. 나는 그것이 가장 빠른 3 초 동안 나타나기를 바란다.
왜 사용'[3.0 : YES afterDelay HUD 숨기기]와 그 호출을 대체 할 수있다? – KudoCC
나는 이것 또한 시도했지만 나를 위해 일하지 않습니다. – Blios