Я столкнулся с очень хорошим API MBProgressHUD , однако, когда я читал документацию в заголовке MBProgressHUD.h Я запутался, так как документ говорит, что - (id)initWithWindow:(UIWindow *)window;
является удобный конструктор .
В соответствии с документами Apple, касающимися управления памятью , конструкторы удобства не должны начинаться с префикса любого из следующих: init , alloc , copy .
Может кто-нибудь уточнить, что я здесь что-то упускаю?
/*** A convenience constructor that initializes the HUD with the window's bounds.
* Calls the designated constructor with
* window.bounds as the parameter.
* @param window The window instance that will provide the bounds for the HUD.
* Should probably be the same instance as
* the HUD's superview (i.e., the window that the HUD will be added to).
*/
- (id)initWithWindow:(UIWindow *)window;