roundedRectBezierPath:withRoundedCorners:withCornerRadius: is private API and will result in an App rejection in the Apple approval process since they are testing now automatically for private api use.
My app was rejected right away since they test automatically.
MBProgressHUD does not use UIBezierPath and so it does not use Private API to draw the HUD view. It uses CGContext (Quartz)