我在我的appDelegate定義這兩個屬性裏面:添加子視圖的視圖從另一個對象
@property (nonatomic, strong) UIView * mainView;
@property (nonatomic, strong) MyCustomClass * customObj
什麼是從代碼中添加子視圖mainView
內customObj
的最佳方式?
我沒有提供任何示例代碼,因爲(a)我的代碼很糟糕,(b)我只是想了解這樣做的最佳方法,所以我可以從中學習,而不是有一個解決方案到一個特定的問題。
非常感謝。
解釋它更好+提供一些解決方案,你已經試過 –