Does awakeFromNib
get called right after viewController is allocated and initialized?
At what precise point does the awakeFromNib
of a view controller get called?
From my debugging session, I see that awakeFromNib
for the rootViewController doesn't get called until [self.window makeKeyAndVisible]
is executed.
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
awakeFromNib
gets called after the view and its subviews were allocated and initialized. It is guaranteed that the view will have all its outlet instance variables set.EDIT: A detailed recount of events:
Source
EDIT 2: This doesn't apply to view controllers loaded from storyboards.
When coder wants load a object that it haven't init yet.
Exp: Control in
UITableViewCell
will init when code callawakeFromNib
that needn'tcellforrow
.