Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ビュー階層にランダムな子ビューがあります。ルート スーパービューに到達するための最善/最速/賢い方法は何ですか?
乾杯、 ダグ
アプリに 1 つしかない場合UIWindow(通常 true)、およびそのウィンドウの唯一のサブビューがルート コントローラーのビューである場合 (これも通常 true):
UIWindow
[randomChildView.window.subviews objectAtIndex:0]
またはview.superview、スーパービューがnil.
view.superview
nil