How to Fixed MBProgressHUD size

817 Views Asked by At

I init a hud and set frame CGRectMake(0, 0, 40, 40) to show a letter, but the width of letter is different, the size of hud is changed as the letters change. How can I fixed the size of hud? Thanks for every help.

MBProgressHUD * hud = [[MBProgressHUD alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
hud.mode = MBProgressHUDModeText;
[self.view addSubview:hud];
hud.label.text = text;//test = @"A" or @"B" or @"C"...etc
[hud showAnimated:YES]
0

There are 0 best solutions below