Position MBProgressHUD at the Bottom/Top of the screen

前端 未结 5 1151
醉话见心
醉话见心 2020-12-17 21:28

Is there a way to make the MBProgressHUD show at the bottom or top of the screen?

I have tried setting the frame using [hud setFrame:....];, initW

5条回答
  •  难免孤独
    2020-12-17 21:56

    Yes, we can change MBProgressHUD view location from center to the bottom or top.

    Just add the yOffset property of the MBProgressHUD and you will get the exact location that you want.

    Use :

    MBProgressHUD *Hud = [[MBProgressHUD alloc] init];
    hud.yOffset = 250.0; //For bottom location.
    

提交回复
热议问题