- [UIViewController awakeFromNib] doesn't call super
| Originator: | farcaller | ||
| Number: | rdar://11119157 | Date Originated: | |
| Status: | Open | Resolved: | |
| Product: | iPhone SDK | Product Version: | 5.1 |
| Classification: | Serious Bug | Reproducible: | Always |
Summary:
The UIViewController's -awakeFromNib does not call -[NSObject(UINibLoadingAdditions) awakeFromNib]. Does not allow to tamper into nib loading globally at one place.
Steps to Reproduce:
1. Swizzle NSObject's awakeFromNib.
2. Load a view controller from nib.
Expected Results:
Swizzled method is called.
Actual Results:
Swizzled method is not called.
Regression:
N/A
Notes:
Looking at the possible guessed disassembly
- (void)awakeFromNib
{
if(_viewControllerFlags & 0x40) {
BOOL passPredicate = ([self _doesSelfOrAncestorPassPredicate:^{...}] != 0);
if([self isViewLoaded] && !passPredicate) {
[self viewDidLoad];
}
}
}
it seems that super call is definitely missing out there.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!