-3
如何在swift中編寫下面的代碼。請幫忙。Swift中的自動調整
UIView* destView = ((UIViewController *)segue.destinationViewController).view;
destView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
destView.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
謝謝!
Thankuuu這麼多 – Ren
'讓destView = segue.destination.view'。沒有可選項,也不需要鑄造。 – Sulthan
雖然你正確地翻譯了代碼。爲什麼不使用「destView?.frame = view.bounds」呢? – Lepidopteron