我遇到了一個非常漂亮的API MBProgressHUD,但是當我在閱讀文檔中的標頭MBProgressHUD.h我糊塗了,因爲醫生說是- (id)initWithWindow:(UIWindow *)window;
是便捷構造。MBProgressHUD命名約定澄清
根據有關memory management蘋果文檔,方便構造函數不應該與任何以下的前綴:初始化,ALLOC,複製。
任何人都可以澄清我是否在這裏失去了一些東西?
/*** 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;
你應該添加一個錯誤報告。 :)現在修復。 https://github.com/jdg/MBProgressHUD/commit/4ba6e7f524577c84e15edfaf035382e994c3bfe7 –
woops,我會做下一次:)感謝修復! – mrd3650