Skip to content

Instantly share code, notes, and snippets.

@dodikk
Created June 18, 2015 15:22
Show Gist options
  • Save dodikk/22bf77ebba15f962854c to your computer and use it in GitHub Desktop.
Save dodikk/22bf77ebba15f962854c to your computer and use it in GitHub Desktop.
Subviews not loaded for xib with autolayout
NSArray* nibObjects = [[NSBundle mainBundle] loadNibNamed: @"HLJCommunicationMethodView"
owner: self
options: nil];
HLJCommunicationMethodView* createdView = objc_member_of_cast<HLJCommunicationMethodView>([nibObjects firstObject]);
result = createdView;
UIStoryboard* board = [UIStoryboard storyboardWithName: @"iPhone"
bundle: nil];
HLJCommunicationMethodViewOwnerVC* owner = [board instantiateViewControllerWithIdentifier: @"HLJCommunicationMethodViewOwnerVC"];
result = owner.view;
@dodikk
Copy link
Author

dodikk commented Jun 18, 2015

po [self subviews]
<__NSArrayI 0x7a66e560>(

)

Inside awakeFromNib after [super awakeFromNib]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment