非常に優れたAPIMBProgressHUDに出くわしましたが、ヘッダー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;