jdg / MBProgressHUD

MBProgressHUD + Customizations
http://www.bukovinski.com/
MIT License
16.01k stars 3.56k forks source link

just change the customView from imageView to UIView,and it does not work!why? #432

Closed wangerk closed 8 years ago

wangerk commented 8 years ago

snip20160919_2

wangerk commented 8 years ago

In addition: how to change customView's size ?

ghost commented 8 years ago

The document comment has said:

The UIView (e.g., a UIImageView) to be shown when the HUD is in MBProgressHUDModeCustomView. The view should implement intrinsicContentSize for proper sizing. For best results use approximately 37 by 37 pixels.

You need to create a new UIView subclass and override its intrinsicContentSize method. UIImageView works because it has its intrinsic content size according to the image you provided.

baight commented 7 years ago

sounds dispiriting ! It means that I have to create a new UIView subclass when I want to use 'customView' feature~~~~God help me !