UIWindow doesn't updating subviews after addSubview - ios

I'm adding a UIView as subview to current keyWindow and it shows fine.
Then when I update the subviews (UILabel, UIButton, UIImageView etc...) it doesn't get update.
I tried adding setNeedDisplay everywhere so it can update it but still no luck.
Adding to UIWindow:
trapAlarmActivity = [[TrapAlarm alloc] initWithUserInfo:params];
[trapAlarmActivity setNeedsDisplay];
[trapAlarmActivity.screenView setNeedsDisplay];
[[UIApplication sharedApplication].keyWindow addSubview:trapAlarmActivity];
[[UIApplication sharedApplication].keyWindow setNeedsDisplay];
Updating the UIWindow:
- (void)changeMessageBoxWithDistance:(NSInteger)distanceToTrap
{
distanceToTrap += arc4random()%100;
distance = distanceToTrap;
dispatch_async(dispatch_get_main_queue(), ^{
NSLog(#"************changeMessageBoxWithDistance: %i", distanceToTrap);
trapType = globalTrap.getTrapType;
if ([ref integerForKey:kUpdate_Distance] == kACTIVE && trapType != CAMERA_LASER)
{
self.labelDistance.text = [NSString stringWithFormat:#"%i %#", distance, NSLocalizedString(#"meters", nil)];
self.labelDescription.text = globalTrap.getTrapDesc;
self.labelTrapType.text = GetTrapTypeString(trapType);
}
else
{
self.labelDistance.text = globalTrap.getTrapDesc;
self.labelDescription.text = GetTrapTypeString(trapType);
self.labelTrapType.text = #"";
}
[self setNeedsDisplay];
[[UIApplication sharedApplication].keyWindow setNeedsDisplay];
[[UIApplication sharedApplication].windows.firstObject setNeedsDisplay];
/*NSEnumerator *frontToBackWindows = [UIApplication sharedApplication].windows.reverseObjectEnumerator;
for (UIWindow *window in frontToBackWindows) {
[window setNeedsDisplay];
}*/
});
}
UPDATE-1:
Updated code to work on main thread, still no luck.
Only 1st UIView added as a subview shown.
UPDATE-2:
recursiveDescription when the UIView is presented on top of the keyWindow:
(lldb) po [[[UIApplication sharedApplication] keyWindow] recursiveDescription]
<UIWindow: 0xd064f20; frame = (0 0; 320 568); autoresize = W+H; gestureRecognizers = <NSArray: 0xd05ecd0>; layer = <UIWindowLayer: 0xd05db90>>
| <SWRevealView: 0xd126130; frame = (0 0; 320 568); autoresize = W+H; layer = <CALayer: 0xd126250>>
| | <UIView: 0xd126400; frame = (0 0; 320 568); autoresize = W+H; gestureRecognizers = <NSArray: 0xd0a2b00>; layer = <CALayer: 0xd126480>>
| | | <UILayoutContainerView: 0xd0909a0; frame = (0 0; 320 568); autoresize = W+H; gestureRecognizers = <NSArray: 0xd093830>; layer = <CALayer: 0xd0894b0>>
| | | | <UINavigationTransitionView: 0xd091310; frame = (0 0; 320 568); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0xd091aa0>>
| | | | | <UIViewControllerWrapperView: 0xd578160; frame = (0 0; 320 568); autoresize = RM+BM; layer = <CALayer: 0xd578230>>
| | | | | | <UIView: 0xd12b620; frame = (0 0; 320 568); autoresize = RM+BM; layer = <CALayer: 0xd12b420>>
| | | | | | | <UIImageView: 0xd12a370; frame = (0 64; 320 67); autoresize = BM; userInteractionEnabled = NO; layer = <CALayer: 0xd12a300>>
| | | | | | | <UITableView: 0xe1d1600; frame = (0 191; 320 377); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0xd081790>; layer = <CALayer: 0xd025310>; contentOffset: {0, 0}>
| | | | | | | | <UITableViewWrapperView: 0xd097cc0; frame = (0 0; 320 377); autoresize = W+H; layer = <CALayer: 0xd097dd0>>
| | | | | | | | | <UITableViewCell: 0x12a48000; frame = (0 315; 320 63); text = ' '; autoresize = W; tag = 5; layer = <CALayer: 0x12a48190>>
| | | | | | | | | | <UITableViewCellScrollView: 0x12a48a70; frame = (0 0; 320 63); autoresize = W+H; gestureRecognizers = <NSArray: 0x12a48d00>; layer = <CALayer: 0x12a48c40>; contentOffset: {0, 0}>
| | | | | | | | | | | <_UITableViewCellSeparatorView: 0x12a48950; frame = (15 62; 305 1); layer = <CALayer: 0x12a489c0>>
| | | | | | | | | | | <UITableViewCellContentView: 0x12a481c0; frame = (0 0; 320 62.5); opaque = NO; gestureRecognizers = <NSArray: 0x12a492f0>; layer = <CALayer: 0x12a48230>>
| | | | | | | | | | | | <UIImageView: 0x12a48260; frame = (9 8; 45 45); clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; tag = 32; layer = <CALayer: 0x12a482e0>>
| | | | | | | | | | | | <UILabel: 0x12a48310; frame = (73 -15; 227 21); text = ''; clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; tag = 30; layer = <CALayer: 0x12a483c0>>
| | | | | | | | | | | | <UILabel: 0x12a486e0; frame = (73 37; 227 21); text = 'היום כולם ידעו על האפליקצ...'; clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; tag = 31; layer = <CALayer: 0x12a48790>>
| | | | | | | | | | | | <UILabel: 0x12a49ae0; frame = (15 0; 290 62.5); text = ' '; userInteractionEnabled = NO; layer = <CALayer: 0x12a49b90>>
| | | | | | | | | | | <_UITableViewCellSeparatorView: 0x12a490a0; frame = (15 62.5; 305 0.5); layer = <CALayer: 0x12a48610>>
| | | | | | | | | <UITableViewCell: 0x12a44230; frame = (0 252; 320 63); text = ' '; autoresize = W; tag = 4; layer = <CALayer: 0x12a443c0>>
| | | | | | | | | | <UITableViewCellScrollView: 0x12a44ca0; frame = (0 0; 320 63); autoresize = W+H; gestureRecognizers = <NSArray: 0x12a44f30>; layer = <CALayer: 0x12a44e70>; contentOffset: {0, 0}>
| | | | | | | | | | | <_UITableViewCellSeparatorView: 0x12a44b80; frame = (15 62; 305 1); layer = <CALayer: 0x12a44bf0>>
| | | | | | | | | | | <UITableViewCellContentView: 0x12a443f0; frame = (0 0; 320 62.5); opaque = NO; gestureRecognizers = <NSArray: 0x12a45520>; layer = <CALayer: 0x12a44460>>
| | | | | | | | | | | | <UIImageView: 0x12a44490; frame = (9 8; 45 45); clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; tag = 32; layer = <CALayer: 0x12a44510>>
| | | | | | | | | | | | <UILabel: 0x12a44540; frame = (73 -15; 227 21); text = ''; clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; tag = 30; layer = <CALayer: 0x12a445f0>>
| | | | | | | | | | | | <UILabel: 0x12a44910; frame = (73 37; 227 21); text = ' גלאי מכמונות סלולארי אתכ...'; clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; tag = 31; layer = <CALayer: 0x12a449c0>>
| | | | | | | | | | | | <UILabel: 0x12a45d10; frame = (15 0; 290 62.5); text = ' '; userInteractionEnabled = NO; layer = <CALayer: 0x12a45dc0>>
| | | | | | | | | | | <_UITableViewCellSeparatorView: 0x12a452d0; frame = (15 62.5; 305 0.5); layer = <CALayer: 0x12a44840>>
| | | | | | | | | <UITableViewCell: 0x12a40790; frame = (0 189; 320 63); text = ' '; autoresize = W; tag = 3; layer = <CALayer: 0x12a40920>>
| | | | | | | | | | <UITableViewCellScrollView: 0x12a411b0; frame = (0 0; 320 63); autoresize = W+H; gestureRecognizers = <NSArray: 0x12a41440>; layer = <CALayer: 0x12a41380>; contentOffset: {0, 0}>
| | | | | | | | | | | <_UITableViewCellSeparatorView: 0x12a410e0; frame = (15 62; 305 1); layer = <CALayer: 0xd0b0590>>
| | | | | | | | | | | <UITableViewCellContentView: 0x12a40950; frame = (0 0; 320 62.5); opaque = NO; gestureRecognizers = <NSArray: 0x12a41840>; layer = <CALayer: 0x12a409c0>>
| | | | | | | | | | | | <UIImageView: 0x12a409f0; frame = (9 8; 45 45); clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; tag = 32; layer = <CALayer: 0x12a40a70>>
| | | | | | | | | | | | <UILabel: 0x12a40aa0; frame = (73 -15; 227 21); text = ''; clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; tag = 30; layer = <CALayer: 0x12a40b50>>
| | | | | | | | | | | | <UILabel: 0x12a40e70; frame = (73 37; 227 21); text = 'שתפו ודווחו לקיר שלנו, עד...'; clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; tag = 31; layer = <CALayer: 0x12a40f20>>
| | | | | | | | | | | | <UILabel: 0x12a41f50; frame = (15 0; 290 62.5); text = ' '; userInteractionEnabled = NO; layer = <CALayer: 0x12a42000>>
| | | | | | | | | | | <_UITableViewCellSeparatorView: 0x12a41570; frame = (15 62.5; 305 0.5); layer = <CALayer: 0xd0b0f80>>
| | | | | | | | | <UITableViewCell: 0x12a3cc40; frame = (0 126; 320 63); text = ' '; autoresize = W; tag = 2; layer = <CALayer: 0x12a3cdd0>>
| | | | | | | | | | <UITableViewCellScrollView: 0x12a3d780; frame = (0 0; 320 63); autoresize = W+H; gestureRecognizers = <NSArray: 0x12a3da10>; layer = <CALayer: 0x12a3d950>; contentOffset: {0, 0}>
| | | | | | | | | | | <_UITableViewCellSeparatorView: 0x12a3d690; frame = (15 62; 305 1); layer = <CALayer: 0xd0984e0>>
| | | | | | | | | | | <UITableViewCellContentView: 0x12a3ce00; frame = (0 0; 320 62.5); opaque = NO; gestureRecognizers = <NSArray: 0x12a3dcd0>; layer = <CALayer: 0x12a3ce70>>
| | | | | | | | | | | | <UIImageView: 0x12a3cea0; frame = (9 8; 45 45); clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; tag = 32; layer = <CALayer: 0x12a3cf20>>
| | | | | | | | | | | | <UILabel: 0x12a3cf50; frame = (73 -15; 227 21); text = ''; clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; tag = 30; layer = <CALayer: 0x12a3d000>>
| | | | | | | | | | | | <UILabel: 0x12a3d320; frame = (73 37; 227 21); text = 'הוסיפו את גלאי מכמונות סל...'; clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; tag = 31; layer = <CALayer: 0x12a3d3d0>>
| | | | | | | | | | | | <UILabel: 0x12a3e4b0; frame = (15 0; 290 62.5); text = ' '; userInteractionEnabled = NO; layer = <CALayer: 0x12a3e560>>
| | | | | | | | | | | <_UITableViewCellSeparatorView: 0x12a3d200; frame = (15 62.5; 305 0.5); layer = <CALayer: 0xd0ae1b0>>
| | | | | | | | | <UITableViewCell: 0x12a39020; frame = (0 63; 320 63); text = 'גלאי מכמונות סלולארי'; autoresize = W; tag = 1; layer = <CALayer: 0x12a391b0>>
| | | | | | | | | | <UITableViewCellScrollView: 0x12a399f0; frame = (0 0; 320 63); autoresize = W+H; gestureRecognizers = <NSArray: 0xd016a50>; layer = <CALayer: 0xd0166e0>; contentOffset: {0, 0}>
| | | | | | | | | | | <_UITableViewCellSeparatorView: 0xd0168a0; frame = (15 62; 305 1); layer = <CALayer: 0xd016990>>
| | | | | | | | | | | <UITableViewCellContentView: 0x12a39260; frame = (0 0; 320 62.5); opaque = NO; gestureRecognizers = <NSArray: 0x12a3a040>; layer = <CALayer: 0x12a392d0>>
| | | | | | | | | | | | <UIImageView: 0x12a39300; frame = (9 8; 45 45); clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; tag = 32; layer = <CALayer: 0x12a39380>>
| | | | | | | | | | | | <UILabel: 0x12a393b0; frame = (73 -15; 227 21); text = ''; clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; tag = 30; layer = <CALayer: 0x12a39460>>
| | | | | | | | | | | | <UILabel: 0x12a39780; frame = (73 37; 227 21); text = 'אפליקציית גלאי מכמונות מה...'; clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; tag = 31; layer = <CALayer: 0x12a39830>>
| | | | | | | | | | | | <UILabel: 0x12a3a960; frame = (15 0; 290 62.5); text = 'גלאי מכמונות סלולארי'; userInteractionEnabled = NO; layer = <CALayer: 0x12a3aa10>>
| | | | | | | | | | | <_UITableViewCellSeparatorView: 0x12a39660; frame = (15 62.5; 305 0.5); layer = <CALayer: 0xd016550>>
| | | | | | | | | <UITableViewCell: 0xd57b950; frame = (0 0; 320 63); text = 'בוקר טוב'; autoresize = W; layer = <CALayer: 0xd57b5e0>>
| | | | | | | | | | <UITableViewCellScrollView: 0xd57c860; frame = (0 0; 320 63); autoresize = W+H; gestureRecognizers = <NSArray: 0xd57ce10>; layer = <CALayer: 0xd57cad0>; contentOffset: {0, 0}>
| | | | | | | | | | | <_UITableViewCellSeparatorView: 0xd57c3f0; frame = (15 62; 305 1); layer = <CALayer: 0xd57c500>>
| | | | | | | | | | | <UITableViewCellContentView: 0xd57bd60; frame = (0 0; 320 62.5); opaque = NO; gestureRecognizers = <NSArray: 0xd081600>; layer = <CALayer: 0xd57be50>>
| | | | | | | | | | | | <UIImageView: 0xd57c000; frame = (9 8; 45 45); clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; tag = 32; layer = <CALayer: 0xd57c080>>
| | | | | | | | | | | | <UILabel: 0xd57c0b0; frame = (73 -15; 227 21); text = ''; clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; tag = 30; layer = <CALayer: 0xd57b0d0>>
| | | | | | | | | | | | <UILabel: 0xd57c1c0; frame = (73 37; 227 21); text = 'יום טוב עם מלא הצלחה'; clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; tag = 31; layer = <CALayer: 0xd57c270>>
| | | | | | | | | | | | <UILabel: 0x12a36bc0; frame = (15 0; 290 62.5); text = 'בוקר טוב'; userInteractionEnabled = NO; layer = <CALayer: 0x12a36c70>>
| | | | | | | | | | | <_UITableViewCellSeparatorView: 0xd0afae0; frame = (15 62.5; 305 0.5); layer = <CALayer: 0x12a44b50>>
| | | | | | | | <MOORefreshView: 0xd0a6ee0; frame = (0 -64; 320 64); autoresize = W; layer = <CALayer: 0xd0a7030>>
| | | | | | | | | <UIActivityIndicatorView: 0xd0a8100; frame = (20 22; 20 20); hidden = YES; layer = <CALayer: 0xd0a81b0>>
| | | | | | | | | | <UIImageView: 0xd0a8260; frame = (0 0; 20 20); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xd0a82e0>>
| | | | | | | | | <UIImageView: 0xd0adc90; frame = (17 7; 26 50); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xd124eb0>>
| | | | | | | | | <UILabel: 0xd12a910; frame = (107 23; 106 18); text = 'Pull to refresh...'; userInteractionEnabled = NO; layer = <CALayer: 0xd124d00>>
| | | | | | | | <UIImageView: 0xd578d70; frame = (0 373.5; 320 3.5); alpha = 0; opaque = NO; autoresize = TM; userInteractionEnabled = NO; layer = <CALayer: 0xd578e40>>
| | | | | | | | <UIImageView: 0xd578f80; frame = (316.5 370; 3.5 7); alpha = 0; opaque = NO; autoresize = LM; userInteractionEnabled = NO; layer = <CALayer: 0xd579050>>
| | | | | | | <UIImageView: 0xd12abd0; frame = (10 141; 40 40); autoresize = RM+BM; userInteractionEnabled = NO; layer = <CALayer: 0xd12b450>>
| | | | | | | <UIImageView: 0xd0998a0; frame = (255 75; 45 45); autoresize = RM+BM; userInteractionEnabled = NO; layer = <CALayer: 0xd099830>>
| | | | | | | <UIImageView: 0xd098320; frame = (255 75; 45 45); userInteractionEnabled = NO; layer = <CALayer: 0xd0983a0>>
| | | | | | | <UILabel: 0xd129fa0; frame = (58 153; 242 21); text = 'You are part of 16 regist...'; clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; layer = <CALayer: 0xd12a050>>
| | | | | | | <UILabel: 0xd283e40; frame = (0 190; 320 1); text = ''; clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; layer = <CALayer: 0xd239dc0>>
| | | | <UINavigationBar: 0xd090a20; frame = (0 20; 320 44); opaque = NO; autoresize = W; gestureRecognizers = <NSArray: 0xd091020>; layer = <CALayer: 0xd08fb70>>
| | | | | <_UINavigationBarBackground: 0xd090ae0; frame = (0 -20; 320 64); opaque = NO; autoresize = W; userInteractionEnabled = NO; layer = <CALayer: 0xd0896a0>>
| | | | | | <_UIBackdropView: 0xd099d60; frame = (0 0; 320 64); opaque = NO; autoresize = W+H; userInteractionEnabled = NO; layer = <_UIBackdropViewLayer: 0xd090440>>
| | | | | | | <_UIBackdropEffectView: 0xd059680; frame = (0 0; 320 64); clipsToBounds = YES; opaque = NO; autoresize = W+H; userInteractionEnabled = NO; layer = <CABackdropLayer: 0xd07a6c0>>
| | | | | | | <UIView: 0xd088560; frame = (0 0; 320 64); hidden = YES; opaque = NO; autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0xd07c130>>
| | | | | | | <UIView: 0xd055ec0; frame = (0 0; 320 64); alpha = 0.85; hidden = YES; opaque = NO; autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0xd028480>>
| | | | | | <UIImageView: 0xd090b80; frame = (0 64; 320 0.5); userInteractionEnabled = NO; layer = <CALayer: 0xd089460>>
| | | | | <UINavigationItemView: 0xd09aae0; frame = (136 8; 48.5 27); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xd0a1c30>>
| | | | | | <UILabel: 0xd0a1e70; frame = (0 2.5; 48.5 22); text = 'Home'; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xd0a1de0>>
| | | | | <UINavigationButton: 0xd285900; frame = (5 1; 62 40); opaque = NO; layer = <CALayer: 0xd089430>>
| | | | | | <UIImageView: 0xd0a3cc0; frame = (11 0; 40 40); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xd0a4fc0>>
| | | | | <_UINavigationBarBackIndicatorView: 0xd091120; frame = (8 12; 12.5 20.5); alpha = 0; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xd091220>>
| <TrapAlarm: 0xd07c8f0; frame = (0 0; 320 568); autoresize = LM+RM+TM+BM; layer = <CALayer: 0xd028b40>>
| | <UIToolbar: 0x12a1d640; frame = (0 0; 320 568); autoresize = LM+RM+TM+BM; layer = <CALayer: 0xd0aed00>>
| | | <_UIToolbarBackground: 0xd294410; frame = (0 0; 320 568); userInteractionEnabled = NO; layer = <CALayer: 0xd2944a0>>
| | | | <_UIBackdropView: 0xd2945e0; frame = (0 0; 320 568); opaque = NO; autoresize = W+H; userInteractionEnabled = NO; layer = <_UIBackdropViewLayer: 0xd2950f0>>
| | | | | <_UIBackdropEffectView: 0xd27daf0; frame = (0 0; 320 568); clipsToBounds = YES; opaque = NO; autoresize = W+H; userInteractionEnabled = NO; layer = <CABackdropLayer: 0xd27db60>>
| | | | | <UIView: 0xd27db90; frame = (0 0; 320 568); hidden = YES; opaque = NO; autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0xd27dbf0>>
| | | <UIImageView: 0x1296bee0; frame = (0 -0.5; 320 0.5); autoresize = W+BM; userInteractionEnabled = NO; layer = <CALayer: 0x1296beb0>>
| | <UIView: 0xd0bdcb0; frame = (0 0; 320 568); autoresize = LM+RM+TM+BM; layer = <CALayer: 0xd00cb10>>
| | | <UIImageView: 0xd0b8930; frame = (0 0; 320 568); opaque = NO; autoresize = LM+RM+TM+BM; userInteractionEnabled = NO; layer = <CALayer: 0x12a49350>>
| | | <UIImageView: 0xd03c7f0; frame = (25 25; 265 128); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xd28fed0>>
| | | <UILabel: 0x1296e330; frame = (27 27; 265 55); text = '190 Meters'; userInteractionEnabled = NO; layer = <CALayer: 0x12957000>>
| | | <UILabel: 0x12967d00; frame = (27 87; 265 32); text = '1 הדסה 90 ב"ש'; userInteractionEnabled = NO; layer = <CALayer: 0xd26c580>>
| | | <UILabel: 0x1296d3e0; frame = (27 117; 265 32); text = 'Netroads Pilot'; userInteractionEnabled = NO; layer = <CALayer: 0xd242de0>>
| | | <UIButton: 0xd12edc0; frame = (290 20; 30 30); opaque = NO; layer = <CALayer: 0xd137d00>>
| | | | <UIImageView: 0xd293cb0; frame = (0 0; 30 30); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xd293d30>>
| | | <UIButton: 0x129668e0; frame = (27 440; 120 35); hidden = YES; opaque = NO; layer = <CALayer: 0xd2168d0>>
| | | | <UIImageView: 0xd272a70; frame = (0 0; 120 35); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xd2867d0>>
| | | | <UIButtonLabel: 0x129666e0; frame = (19 6; 81 22); text = 'Not exists'; clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xd2fbce0>>
| | | <UIButton: 0xd084ec0; frame = (160 440; 120 35); hidden = YES; opaque = NO; layer = <CALayer: 0xd008230>>
| | | | <UIImageView: 0xd284600; frame = (0 0; 120 35); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x1293a970>>
| | | | <UIButtonLabel: 0x1296bb10; frame = (36 6; 48 22); text = 'Exists'; clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x1296bbc0>>
(lldb)
UPDATE-3:
I ended up turning the UIView to UIViewController and showing it via:
appDelegate.window.rootViewController = testViewController;
[appDelegate.window makeKeyAndVisible];
And dismissing it via pushing back the original viewController.

call setNeedsDisplay method on your application’s main thread when you want to adjust the layout of a view’s subviews.

Related

UINavigationController is nil in RCT_EXPORT_METHOD (React Native)

I have a project where I am mixing native code with React Native. I show the React view like this:
self.reactView = [[RCTRootView alloc] initWithBridge:bridge moduleName:#"DemoPage" initialProperties:initialProperties];
[self.view addSubview:self.reactView];
The above works and the view displays correctly. The view is a list of items. When a list item is selected it should respond back to my view controller and I will push a native view controller. I do this with a Native Module like this:
RCT_EXPORT_MODULE(NavigationUtils);
RCT_EXPORT_METHOD(navigateWithParameters:(NSString *)parameters)
{
ViewController *viewController = [[ViewController alloc] initWithNibName:#"ViewController" bundle:nil];
[self.navigationController pushViewController:viewController animated:YES];
}
My problem is, when trying to pushViewController:, self.navigationController is nil and so the push does nothing.
presentViewController: also does not work.
self.navigationController is not nil in viewWillAppear: or viewDidAppear:
Does anyone know how I can push a new native view controller from a React Native Module?
Here is an edited version of the recursiveDescription for the view hierarchy.
<UIWindow: 0x102a10970; frame = (0 0; 414 736); autoresize = W+H; tintColor = UIExtendedSRGBColorSpace 0.313725 0.52549 0.764706 1; gestureRecognizers = <NSArray: 0x17405ab20>; layer = <UIWindowLayer: 0x17422ae20>>
| <UIView: 0x102b55ff0; frame = (0 0; 414 736); autoresize = W+H; gestureRecognizers = <NSArray: 0x17064e550>; layer = <CALayer: 0x170631220>>
| | <UIView: 0x102b6b580; frame = (0 0; 414 736); autoresize = W+H; layer = <CALayer: 0x170631260>>
| | | <UILayoutContainerView: 0x102b689d0; frame = (0 0; 314 736); hidden = YES; autoresize = RM+H; gestureRecognizers = <NSArray: 0x17064d410>; layer = <CALayer: 0x17062f4e0>>
| | | | <UINavigationTransitionView: 0x102b6ab20; frame = (0 0; 314 736); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0x170631100>>
| | | | | <UIViewControllerWrapperView: 0x102b74ad0; frame = (0 0; 314 736); autoresize = W+H; layer = <CALayer: 0x1706350c0>>
| | | | | | <UITableView: 0x10388f400; frame = (0 0; 314 736); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x1748569e0>; layer = <CALayer: 0x17482a600>; contentOffset: {0, 0}; contentSize: {314, 630}>
| | | | | | | ...Cells and seperators
| | | | <UINavigationBar: 0x102b68b90; frame = (0 20; 314 44); opaque = NO; autoresize = W; gestureRecognizers = <NSArray: 0x17064db00>; layer = <CALayer: 0x170630c60>>
| | | | | <_UIBarBackground: 0x102b68e40; frame = (0 -20; 314 64); userInteractionEnabled = NO; layer = <CALayer: 0x170630ce0>>
| | | | | | <UIImageView: 0x102b69450; frame = (0 64; 314 0.333333); userInteractionEnabled = NO; layer = <CALayer: 0x170630d20>> - (null)
| | | | | | <UIVisualEffectView: 0x102b69640; frame = (0 0; 314 64); layer = <CALayer: 0x170630d40>>
| | | | | | | <_UIVisualEffectBackdropView: 0x102b69a80; frame = (0 0; 314 64); autoresize = W+H; userInteractionEnabled = NO; layer = <UICABackdropLayer: 0x170630da0>>
| | | | | | | <_UIVisualEffectFilterView: 0x102b6a380; frame = (0 0; 314 64); autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0x170630f60>>
| | | | | | | <_UIVisualEffectFilterView: 0x102a850b0; frame = (0 0; 314 64); alpha = 0.85; autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0x17482c3e0>>
| | | | | <UIImageView: 0x102a7e940; frame = (89 3.33333; 136 37.6667); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x174829240>> - (null)
| | | | | <_UINavigationBarBackIndicatorView: 0x102b6a730; frame = (12 11.6667; 13 21); alpha = 0; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x170631000>> - Back
| | | <MMDrawerCenterContainerView: 0x102b6b8d0; frame = (0 0; 414 736); autoresize = W+H; layer = <CALayer: 0x1706312c0>>
| | | | <UILayoutContainerView: 0x102aafb40; frame = (0 0; 414 736); autoresize = W+H; gestureRecognizers = <NSArray: 0x170441890>; layer = <CALayer: 0x17422ad60>>
| | | | | <UINavigationTransitionView: 0x102ab02e0; frame = (0 0; 414 736); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0x17422adc0>>
| | | | | | <UIViewControllerWrapperView: 0x102a828b0; frame = (0 0; 414 736); autoresize = W+H; layer = <CALayer: 0x174a201a0>>
| | | | | | | <UIView: 0x102b98e20; frame = (0 0; 414 736); autoresize = W+H; layer = <CALayer: 0x170c209a0>>
| | | | | | | | <RCTRootView: 0x102b9a8d0; frame = (0 64; 414 736); autoresize = W+H; layer = <CALayer: 0x170c221c0>>
| | | | | | | | | ...subviews of RCTRootView
| | | | | <UINavigationBar: 0x102aaf160; frame = (0 20; 414 44); opaque = NO; autoresize = W; gestureRecognizers = <NSArray: 0x174258690>; layer = <CALayer: 0x17422a720>>
| | | | | | <_UIBarBackground: 0x102aaf410; frame = (0 -20; 414 64); userInteractionEnabled = NO; layer = <CALayer: 0x17422ab40>>
| | | | | | | <UIImageView: 0x102a9e1e0; frame = (0 64; 414 0.333333); userInteractionEnabled = NO; layer = <CALayer: 0x17422a9c0>> - (null)
| | | | | | | <UIVisualEffectView: 0x102a9e3d0; frame = (0 0; 414 64); layer = <CALayer: 0x174230c60>>
| | | | | | | | <_UIVisualEffectBackdropView: 0x102a98840; frame = (0 0; 414 64); autoresize = W+H; userInteractionEnabled = NO; layer = <UICABackdropLayer: 0x1742327c0>>
| | | | | | | | <_UIVisualEffectFilterView: 0x102a98ba0; frame = (0 0; 414 64); autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0x174233560>>
| | | | | | | | <_UIVisualEffectFilterView: 0x102ab1380; frame = (0 0; 414 64); alpha = 0.85; autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0x174233660>>
| | | | | | <<UINavigationItemView: 0x102ab04c0; frame = (169.333 8; 75.3333 27); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x174422a80>>: item=<<UINavigationItem: 0x1703c6900>: title:'Accounts'> title=Accounts>
| | | | | | | <UILabel: 0x102b1a660; frame = (0 3; 75.3333 21.3333); text = 'Accounts'; opaque = NO; userInteractionEnabled = NO; layer = <_UILabelLayer: 0x17488cda0>>
| | | | | | <UINavigationButton: 0x102a80b40; frame = (9 6; 48 30); opaque = NO; tintColor = UIExtendedSRGBColorSpace 0.313725 0.52549 0.764706 1; layer = <CALayer: 0x174830340>>
| | | | | | | <UIImageView: 0x102b66cd0; frame = (11 2; 26 26); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x170c20bc0>> - (null)
| | | | | | <_UINavigationBarBackIndicatorView: 0x102ab00f0; frame = (12 11.6667; 13 21); alpha = 0; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x17422ad20>> - Back
Did you tried to present your vc from rootViewController ?
UIViewController *rootVC = [[[UIApplication sharedApplication] window] rootViewController];
[rootVC presentViewController:viewController animated:YES completion: nil];
Update:
Regarding your view hierarchy, I can suggest to use a little bit of ugly introspection for pushing :
UIViewController *rootVC = [[[UIApplication sharedApplication] window] rootViewController];
if ([rootVC isKindOfClass:[MMDrawerController class]]) {
MMDrawerController *drawer = (MMDrawerController *)rootVC;
UIViewController *realRootVC = drawer.centerViewController;
if (realRootVC != nil) {
if (realRootVC.navigationController != nil) {
[realRootVC.navigationController presentViewController:viewController animated:YES completion: nil];
} else if ([realRootVC isKindOfClass:[UINavigationController class]]) {
UINavigationController *nv = (UINavigationController *)realRootVC;
[nv presentViewController:viewController animated:YES completion: nil];
}
}
}

UIView overlay is unresponsive to touch

I display a UIView overlay in our app by including the view as one of two siblings in a parent view and having the frame.y coordinate just offscreen to the bottom. I then animate the moving of this frame up over the sibling. The hiddenYOrigin value is a float to hold the original offscreen y value:
- (void)awakeFromNib
{
hiddenYOrigin = self.frame.origin.y;
}
Then I call showAnimated from the other view:
- (void)showAnimated
{
CGRect frame = self.superview.frame;
frame.origin.y = -hiddenYOrigin + 20;
[UIView animateWithDuration:0.4 animations:^{
self.superview.frame = frame;
} completion:^(BOOL finished){
[self.controller overlayDidShow:self];
}];
}
This does properly show the overlay and is the exact same mechanism we use in our other apps, but for whatever reason in this app the overlay is completely unresponsive to touch. It has several buttons for various actions including hiding the overlay and yet nothing touch is received.
I added a hitTest function to debug whether any touches were coming through but no touches ever fire the hitTest.
Any ideas?
EDIT:
Here is the output from running the "po" command mentioned by #robmayoff:
(lldb) po [[UIApp keyWindow] recursiveDescription]
<UIWindow: 0xbb47ab0; frame = (0 0; 320 480); gestureRecognizers = <NSArray: 0xbb47f70>; layer = <UIWindowLayer: 0xbb47b90>>
| <UILayoutContainerView: 0xbae7780; frame = (0 0; 320 480); autoresize = W+H; gestureRecognizers = <NSArray: 0xbab2370>; layer = <CALayer: 0xba5be40>>
| | <UINavigationTransitionView: 0xbafb770; frame = (0 0; 320 480); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0xbaf6090>>
| | | <UIViewControllerWrapperView: 0xbb783d0; frame = (0 0; 320 480); autoresize = RM+BM; layer = <CALayer: 0xbb78480>>
| | | | <UIView: 0x10b6efc0; frame = (0 0; 320 480); clipsToBounds = YES; autoresize = RM+BM; layer = <CALayer: 0x10b6f020>>
| | | | | <UIView: 0x10b6d920; frame = (54 20; 266 460); autoresize = LM+BM; layer = <CALayer: 0x10b6d980>>
| | | | | | <UITableView: 0xc215e00; frame = (0 44; 266 400); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x10b6ced0>; layer = <CALayer: 0x10b6ca70>; contentOffset: {0, -20}>
| | | | | | | <UITableViewWrapperView: 0x10b6d1d0; frame = (0 0; 266 400); autoresize = W+H; layer = <CALayer: 0x10b6d240>>
| | | | | | | | <CustomButtonCell: 0x10ba6d40; baseClass = UITableViewCell; frame = (0 202; 266 44); text = 'Toggle All'; autoresize = W; layer = <CALayer: 0x10ba6c00>>
| | | | | | | | | <UITableViewCellScrollView: 0x10ba6ed0; frame = (0 0; 266 44); autoresize = W+H; gestureRecognizers = <NSArray: 0x10ba7160>; layer = <CALayer: 0x10ba70a0>; contentOffset: {0, 0}>
| | | | | | | | | | <UIImageView: 0x10b67390; frame = (0 0; 266 44); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10b67480>> - (null)
| | | | | | | | | | <UITableViewCellContentView: 0x10ba7350; frame = (0 0; 266 44); gestureRecognizers = <NSArray: 0x10ba7560>; layer = <CALayer: 0x10ba73c0>>
| | | | | | | | | | | <UILabel: 0x10ba75b0; frame = (15 0; 236 44); text = 'Toggle All'; userInteractionEnabled = NO; layer = <CALayer: 0x10ba7660>>
| | | | | | | | <UITableViewCell: 0x10ba6030; frame = (0 164; 266 38); text = 'Categories'; autoresize = W; layer = <CALayer: 0x10ba5fa0>>
| | | | | | | | | <UITableViewCellScrollView: 0x10ba61c0; frame = (0 0; 266 38); autoresize = W+H; gestureRecognizers = <NSArray: 0x10ba6450>; layer = <CALayer: 0x10ba6390>; contentOffset: {0, 0}>
| | | | | | | | | | <UITableViewCellContentView: 0x10ba6640; frame = (0 0; 266 38); gestureRecognizers = <NSArray: 0x10ba6850>; layer = <CALayer: 0x10ba66b0>>
| | | | | | | | | | | <UILabel: 0x10ba68a0; frame = (15 0; 236 38); text = 'Categories'; userInteractionEnabled = NO; layer = <CALayer: 0x10ba6950>>
| | | | | | | | <SegmentedControlCell: 0x10b9afd0; baseClass = UITableViewCell; frame = (0 120; 266 44); autoresize = W; layer = <CALayer: 0x10b9b200>>
| | | | | | | | | <UITableViewCellScrollView: 0x10b9b430; frame = (0 0; 266 44); autoresize = W+H; gestureRecognizers = <NSArray: 0x10b9b6c0>; layer = <CALayer: 0x10b9b600>; contentOffset: {0, 0}>
| | | | | | | | | | <UITableViewCellContentView: 0x10b9b8b0; frame = (0 0; 266 44); gestureRecognizers = <NSArray: 0x10b9bac0>; layer = <CALayer: 0x10b9b920>>
| | | | | | | | | | | <UISegmentedControl: 0x10b9bd30; frame = (0 0; 266 44); opaque = NO; layer = <CALayer: 0x10b9be70>>
| | | | | | | | | | | | <UISegment: 0x10ba4ef0; frame = (178 0; 88 44); opaque = NO; layer = <CALayer: 0x10ba4e40>> - Room
| | | | | | | | | | | | | <UIImageView: 0x10ba5630; frame = (88 0; 2 44); alpha = 0; opaque = NO; autoresize = LM; userInteractionEnabled = NO; tag = -1030; layer = <CALayer: 0x10ba56b0>> - (null)
| | | | | | | | | | | | | <UISegmentLabel: 0x10bcede0; frame = (13.5 11; 43 20); text = 'Room'; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10bcee90>>
| | | | | | | | | | | | <UISegment: 0x10ba43f0; frame = (89 0; 87 44); opaque = NO; layer = <CALayer: 0x10ba43b0>> - Category
| | | | | | | | | | | | | <UIImageView: 0x10ba4c50; frame = (87 0; 2 44); opaque = NO; autoresize = LM; userInteractionEnabled = NO; tag = -1030; layer = <CALayer: 0x10ba4cd0>> - (null)
| | | | | | | | | | | | | <UISegmentLabel: 0x10bcfe40; frame = (10.5 11; 66 20); text = 'Category'; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10bd0400>>
| | | | | | | | | | | | <UISegment: 0x10ba0fb0; frame = (0 0; 87 44); opaque = NO; layer = <CALayer: 0x10ba1130>> - Time
| | | | | | | | | | | | | <UIImageView: 0x10ba3ec0; frame = (87 0; 2 44); opaque = NO; autoresize = LM; userInteractionEnabled = NO; tag = -1030; layer = <CALayer: 0x10ba3cf0>> - (null)
| | | | | | | | | | | | | <UISegmentLabel: 0x10bce190; frame = (35 11; 35 20); text = 'Time'; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10bce240>>
| | | | | | | | <UITableViewCell: 0x10b9a210; frame = (0 82; 266 38); text = 'Order By'; autoresize = W; layer = <CALayer: 0x10b99870>>
| | | | | | | | | <UITableViewCellScrollView: 0x10b9a3a0; frame = (0 0; 266 38); autoresize = W+H; gestureRecognizers = <NSArray: 0x10b9a5f0>; layer = <CALayer: 0x10b9a570>; contentOffset: {0, 0}>
| | | | | | | | | | <UITableViewCellContentView: 0x10b9a7e0; frame = (0 0; 266 38); gestureRecognizers = <NSArray: 0x10b9a9f0>; layer = <CALayer: 0x10b9a850>>
| | | | | | | | | | | <UILabel: 0x10b9aa40; frame = (15 0; 236 38); text = 'Order By'; userInteractionEnabled = NO; layer = <CALayer: 0x10b9aaf0>>
| | | | | | | | <CustomButtonCell: 0x10b95850; baseClass = UITableViewCell; frame = (0 38; 266 44); text = 'All Days'; autoresize = W; layer = <CALayer: 0x10b95a80>>
| | | | | | | | | <UITableViewCellScrollView: 0x10b95cb0; frame = (0 0; 266 44); autoresize = W+H; gestureRecognizers = <NSArray: 0x10b95f40>; layer = <CALayer: 0x10b95e80>; contentOffset: {0, 0}>
| | | | | | | | | | <UIImageView: 0x10b63a10; frame = (0 0; 266 44); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10b63ac0>> - (null)
| | | | | | | | | | <UITableViewCellContentView: 0x10b96130; frame = (0 0; 266 44); gestureRecognizers = <NSArray: 0x10b96340>; layer = <CALayer: 0x10b961a0>>
| | | | | | | | | | | <UILabel: 0x10b96390; frame = (15 0; 236 44); text = 'All Days'; userInteractionEnabled = NO; layer = <CALayer: 0x10b96440>>
| | | | | | | | | | | <UIImageView: 0x10b638b0; frame = (224 15; 18 14); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10b63850>> - (null)
| | | | | | | | <UITableViewCell: 0x10b948b0; frame = (0 0; 266 38); text = 'Dates'; autoresize = W; layer = <CALayer: 0x10b94770>>
| | | | | | | | | <UITableViewCellScrollView: 0x10b94a40; frame = (0 0; 266 38); autoresize = W+H; gestureRecognizers = <NSArray: 0x10b94cd0>; layer = <CALayer: 0x10b94c10>; contentOffset: {0, 0}>
| | | | | | | | | | <UITableViewCellContentView: 0x10b94ec0; frame = (0 0; 266 38); gestureRecognizers = <NSArray: 0x10b950d0>; layer = <CALayer: 0x10b94f30>>
| | | | | | | | | | | <UILabel: 0x10b95120; frame = (15 0; 236 38); text = 'Dates'; userInteractionEnabled = NO; layer = <CALayer: 0x10b951d0>>
| | | | | | | | <UITableViewCell: 0x10b93ea0; frame = (0 0; 266 0); autoresize = W; layer = <CALayer: 0x10b94030>>
| | | | | | | | | <UITableViewCellScrollView: 0x10b94060; frame = (0 0; 266 0); autoresize = W+H; gestureRecognizers = <NSArray: 0x10b942d0>; layer = <CALayer: 0x10b94230>; contentOffset: {0, 0}>
| | | | | | | | | | <UITableViewCellContentView: 0x10b944c0; frame = (0 0; 266 0); gestureRecognizers = <NSArray: 0x10b946d0>; layer = <CALayer: 0x10b94530>>
| | | | | | | | <UITableViewCell: 0x10b93320; frame = (0 0; 266 0); autoresize = W; layer = <CALayer: 0x10b934b0>>
| | | | | | | | | <UITableViewCellScrollView: 0x10b934e0; frame = (0 0; 266 0); autoresize = W+H; gestureRecognizers = <NSArray: 0x10b93770>; layer = <CALayer: 0x10b936b0>; contentOffset: {0, 0}>
| | | | | | | | | | <UITableViewCellContentView: 0x10b93960; frame = (0 0; 266 0); gestureRecognizers = <NSArray: 0x10b93b70>; layer = <CALayer: 0x10b939d0>>
| | | | | | | | <CategorySelectionCell: 0xbb9e3b0; baseClass = UITableViewCell; frame = (0 246; 266 44); text = 'Communication'; autoresize = W; layer = <CALayer: 0xbb9f790>>
| | | | | | | | | <UITableViewCellScrollView: 0xbb9f9c0; frame = (0 0; 266 44); autoresize = W+H; gestureRecognizers = <NSArray: 0xbb9fc30>; layer = <CALayer: 0xbb9fb90>; contentOffset: {0, 0}>
| | | | | | | | | | <UIImageView: 0x10b3b070; frame = (0 0; 266 44); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10b95b00>> - (null)
| | | | | | | | | | <UIImageView: 0x10b32560; frame = (0 -0.5; 266 45); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xbadc9a0>> - (null)
| | | | | | | | | | <UITableViewCellContentView: 0xbb9fe20; frame = (0 0; 266 44); opaque = NO; gestureRecognizers = <NSArray: 0xbba0030>; layer = <CALayer: 0xbb9fe90>>
| | | | | | | | | | | <UILabel: 0xbba0080; frame = (65 0; 186 44); text = 'Communication'; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xbba0130>>
| | | | | | | | | | | <UIImageView: 0x10bbabf0; frame = (25 7; 30 30); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10bbac90>> - (null)
| | | | | | | | <CategorySelectionCell: 0xbba2360; baseClass = UITableViewCell; frame = (0 290; 266 44); text = 'Entertainment'; autoresize = W; layer = <CALayer: 0xbba22f0>>
| | | | | | | | | <UITableViewCellScrollView: 0xbba24f0; frame = (0 0; 266 44); autoresize = W+H; gestureRecognizers = <NSArray: 0xbba2720>; layer = <CALayer: 0xbba2320>; contentOffset: {0, 0}>
| | | | | | | | | | <UIImageView: 0xbadc850; frame = (0 0; 266 44); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10ba2ce0>> - (null)
| | | | | | | | | | <UIImageView: 0x10b7e4a0; frame = (0 -0.5; 266 45); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10b82c30>> - (null)
| | | | | | | | | | <UITableViewCellContentView: 0xbba2910; frame = (0 0; 266 44); opaque = NO; gestureRecognizers = <NSArray: 0xbba2b20>; layer = <CALayer: 0xbba2980>>
| | | | | | | | | | | <UILabel: 0xbba2b70; frame = (65 0; 186 44); text = 'Entertainment'; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xbba2c20>>
| | | | | | | | | | | <UIImageView: 0x10bbb040; frame = (25 7; 30 30); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10bbb0e0>> - (null)
| | | | | | | | <CategorySelectionCell: 0xbba6110; baseClass = UITableViewCell; frame = (0 334; 266 44); text = 'Event Technology'; autoresize = W; layer = <CALayer: 0xbba6090>>
| | | | | | | | | <UITableViewCellScrollView: 0xbba62a0; frame = (0 0; 266 44); autoresize = W+H; gestureRecognizers = <NSArray: 0xbba64b0>; layer = <CALayer: 0xbba2ee0>; contentOffset: {0, 0}>
| | | | | | | | | | <UIImageView: 0x10b9d5f0; frame = (0 0; 266 44); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10b9d6c0>> - (null)
| | | | | | | | | | <UIImageView: 0x10b9d750; frame = (0 -0.5; 266 45); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10b9d840>> - (null)
| | | | | | | | | | <UITableViewCellContentView: 0xbba66a0; frame = (0 0; 266 44); opaque = NO; gestureRecognizers = <NSArray: 0xbba68b0>; layer = <CALayer: 0xbba6710>>
| | | | | | | | | | | <UILabel: 0xbba6900; frame = (65 0; 186 44); text = 'Event Technology'; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xbba69b0>>
| | | | | | | | | | | <UIImageView: 0x10bbb450; frame = (25 7; 30 30); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10bbb4f0>> - (null)
| | | | | | | | <CategorySelectionCell: 0xbba9ea0; baseClass = UITableViewCell; frame = (0 378; 266 44); text = 'Exhibitor Mgmt.'; autoresize = W; layer = <CALayer: 0xbba9e20>>
| | | | | | | | | <UITableViewCellScrollView: 0xbbaa030; frame = (0 0; 266 44); autoresize = W+H; gestureRecognizers = <NSArray: 0xbbaa240>; layer = <CALayer: 0xbba6c70>; contentOffset: {0, 0}>
| | | | | | | | | | <UIImageView: 0x10bb9110; frame = (0 0; 266 44); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10bb9220>> - (null)
| | | | | | | | | | <UIImageView: 0x10bb92c0; frame = (0 -0.5; 266 45); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10bb93b0>> - (null)
| | | | | | | | | | <UITableViewCellContentView: 0xbbaa430; frame = (0 0; 266 44); opaque = NO; gestureRecognizers = <NSArray: 0xbbaa640>; layer = <CALayer: 0xbbaa4a0>>
| | | | | | | | | | | <UILabel: 0xbbaa690; frame = (65 0; 186 44); text = 'Exhibitor Mgmt.'; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xbbaa740>>
| | | | | | | | | | | <UIImageView: 0x10bbb860; frame = (25 7; 30 30); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10bbb900>> - (null)
| | | | | | | <UIView: 0x10bbab90; frame = (0 365; 266 15); autoresize = W; layer = <CALayer: 0x10bb7b30>>
| | | | | | | <UIImageView: 0x10b6cca0; frame = (0 376.5; 266 3.5); alpha = 0; opaque = NO; autoresize = TM; userInteractionEnabled = NO; layer = <CALayer: 0x10b6cae0>> - (null)
| | | | | | | <UIImageView: 0x10bc4850; frame = (262.5 -20; 3.5 400); alpha = 0; opaque = NO; autoresize = LM; userInteractionEnabled = NO; layer = <CALayer: 0x10bc4920>> - (null)
| | | | | | <UIImageView: 0x10b6d9b0; frame = (266 0; 3 460); autoresize = RM+BM; userInteractionEnabled = NO; layer = <CALayer: 0x10b6da30>> - (null)
| | | | | | <UIImageView: 0x10b8eba0; frame = (0 0; 266 44); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10b8dd90>> - (null)
| | | | | | | <UILabel: 0x10baaa50; frame = (0 0; 266 44); text = ' '; userInteractionEnabled = NO; layer = <CALayer: 0x10b94860>>
| | | | | | <UIButton: 0x10ba47c0; frame = (70 6; 140 44); opaque = NO; layer = <CALayer: 0x10b9ded0>>
| | | | | | | <UIImageView: 0x10bc9850; frame = (0 0; 140 44); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10bc86d0>> - (null)
| | | | | | | <UIButtonLabel: 0x10b725e0; frame = (50 11; 40 22); text = 'Filter'; clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10ba45e0>>
| | | | | | <UITableView: 0xc215a00; frame = (0 44; 266 400); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x10b6c680>; layer = <CALayer: 0x10b6c220>; contentOffset: {0, 0}>
| | | | | | | <UIView: 0x10b88340; frame = (0 -400; 266 400); hidden = YES; autoresize = W; layer = <CALayer: 0x10b88040>>
| | | | | | | <UITableViewWrapperView: 0x10b6c980; frame = (0 0; 266 400); autoresize = W+H; layer = <CALayer: 0x10b6c9f0>>
| | | | | | | | <SessionTableViewCell: 0xbb9d2d0; baseClass = UITableViewCell; frame = (0 364; 266 76); autoresize = W; layer = <CALayer: 0xbb9d210>>
| | | | | | | | | <UITableViewCellScrollView: 0xbb9d470; frame = (0 0; 266 76); autoresize = W+H; gestureRecognizers = <NSArray: 0xbb9d700>; layer = <CALayer: 0xbb9d640>; contentOffset: {0, 0}>
| | | | | | | | | | <UITableViewCellContentView: 0xbb9b900; frame = (0 0; 266 76); gestureRecognizers = <NSArray: 0xbb9bac0>; layer = <CALayer: 0xbb9d8f0>>
| | | | | | | | | | | <MTLabel: 0xbb9bb70; frame = (20 10; 250 40); text = 'Effortless CEU Session Ma...'; opaque = NO; layer = <CALayer: 0xbb9bc10>>
| | | | | | | | | | | <UILabel: 0xbb9c050; frame = (20 56; 58.5181 12); text = 'Bayside C • '; userInteractionEnabled = NO; layer = <CALayer: 0xbb9c100>>
| | | | | | | | | | | <UILabel: 0xbb9c530; frame = (78.5181 56; 129.216 12); text = 'Mar. 7 1:00pm - 2:00pm'; userInteractionEnabled = NO; layer = <CALayer: 0xbb9c630>>
| | | | | | | | | | | <UIImageView: 0xbb9f1b0; frame = (0 74; 266 2); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xbb9f2a0>> - (null)
| | | | | | | | <SessionTableViewCell: 0xbb9a0b0; baseClass = UITableViewCell; frame = (0 284; 266 60); autoresize = W; layer = <CALayer: 0xbb99ff0>>
| | | | | | | | | <UITableViewCellScrollView: 0xbb9a250; frame = (0 0; 266 60); autoresize = W+H; gestureRecognizers = <NSArray: 0xbb9a4e0>; layer = <CALayer: 0xbb9a420>; contentOffset: {0, 0}>
| | | | | | | | | | <UITableViewCellContentView: 0xbb9a6d0; frame = (0 0; 266 60); gestureRecognizers = <NSArray: 0xbb9a8e0>; layer = <CALayer: 0xbb9a740>>
| | | | | | | | | | | <MTLabel: 0xbb9a990; frame = (20 12; 250 20); text = 'Lunch - Day 1'; opaque = NO; layer = <CALayer: 0xbb9aa30>>
| | | | | | | | | | | <UILabel: 0xbb9ae70; frame = (20 38; 104.457 12); text = 'Main Dining Room • '; userInteractionEnabled = NO; layer = <CALayer: 0xbb9af20>>
| | | | | | | | | | | <UILabel: 0xbb9b450; frame = (124.457 38; 135.888 12); text = 'Mar. 7 12:00pm - 1:00pm'; userInteractionEnabled = NO; layer = <CALayer: 0xbb9b560>>
| | | | | | | | | | | <UIImageView: 0xbb9d0b0; frame = (0 58; 266 2); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xbb9d1a0>> - (null)
| | | | | | | | <SessionTableViewCell: 0xbb99350; baseClass = UITableViewCell; frame = (0 204; 266 60); autoresize = W; layer = <CALayer: 0xbb99290>>
| | | | | | | | | <UITableViewCellScrollView: 0xbb994f0; frame = (0 0; 266 60); autoresize = W+H; gestureRecognizers = <NSArray: 0xbb99780>; layer = <CALayer: 0xbb996c0>; contentOffset: {0, 0}>
| | | | | | | | | | <UITableViewCellContentView: 0xbb97990; frame = (0 0; 266 60); gestureRecognizers = <NSArray: 0xbb97b40>; layer = <CALayer: 0xbb99970>>
| | | | | | | | | | | <MTLabel: 0xbb97bf0; frame = (20 12; 250 20); text = 'Keynote Address'; opaque = NO; layer = <CALayer: 0xbb97c90>>
| | | | | | | | | | | <UILabel: 0xbb980d0; frame = (20 38; 90.7769 12); text = 'Grand Ballroom • '; userInteractionEnabled = NO; layer = <CALayer: 0xbb98180>>
| | | | | | | | | | | <UILabel: 0xbb985b0; frame = (110.777 38; 135.216 12); text = 'Mar. 7 9:00am - 12:00pm'; userInteractionEnabled = NO; layer = <CALayer: 0xbb986b0>>
| | | | | | | | | | | <UIImageView: 0xbb99e90; frame = (0 58; 266 2); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xbb99f80>> - (null)
| | | | | | | | <SessionTableViewCell: 0xbb95890; baseClass = UITableViewCell; frame = (0 124; 266 60); autoresize = W; layer = <CALayer: 0xbb95830>>
| | | | | | | | | <UITableViewCellScrollView: 0xbb95a30; frame = (0 0; 266 60); autoresize = W+H; gestureRecognizers = <NSArray: 0xbb95cc0>; layer = <CALayer: 0xbb95c00>; contentOffset: {0, 0}>
| | | | | | | | | | <UITableViewCellContentView: 0xbb95eb0; frame = (0 0; 266 60); gestureRecognizers = <NSArray: 0xbb96140>; layer = <CALayer: 0xbb95fa0>>
| | | | | | | | | | | <MTLabel: 0xbb961f0; frame = (20 12; 250 20); text = 'Welcome / Meet and Greet'; opaque = NO; layer = <CALayer: 0xbb96310>>
| | | | | | | | | | | <UILabel: 0xbb96750; frame = (20 38; 69.0776 12); text = 'Front Foyer • '; userInteractionEnabled = NO; layer = <CALayer: 0xbb96800>>
| | | | | | | | | | | <UILabel: 0xbb975e0; frame = (89.0776 38; 127.872 12); text = 'Mar. 7 8:00am - 9:00am'; userInteractionEnabled = NO; layer = <CALayer: 0xbb976c0>>
| | | | | | | | | | | <UIImageView: 0xbb99130; frame = (0 58; 266 2); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xbb99220>> - (null)
| | | | | | | | <SessionTableViewCell: 0xbb94a10; baseClass = UITableViewCell; frame = (0 64; 266 60); autoresize = W; layer = <CALayer: 0xbb92f40>>
| | | | | | | | | <UITableViewCellScrollView: 0xbb94d30; frame = (0 0; 266 60); autoresize = W+H; gestureRecognizers = <NSArray: 0xbb912d0>; layer = <CALayer: 0xbb92ff0>; contentOffset: {0, 0}>
| | | | | | | | | | <UITableViewCellContentView: 0xbb939a0; frame = (0 0; 266 60); gestureRecognizers = <NSArray: 0xbb93bf0>; layer = <CALayer: 0xbb93a50>>
| | | | | | | | | | | <MTLabel: 0xbb93fc0; frame = (20 12; 250 20); text = 'Registration Desk - Day 1'; opaque = NO; layer = <CALayer: 0xbb94100>>
| | | | | | | | | | | <UILabel: 0xbb946c0; frame = (20 38; 69.0776 12); text = 'Front Foyer • '; userInteractionEnabled = NO; layer = <CALayer: 0xbb94770>>
| | | | | | | | | | | <UILabel: 0xbb94fd0; frame = (89.0776 38; 134.544 12); text = 'Mar. 7 8:00am - 10:00am'; userInteractionEnabled = NO; layer = <CALayer: 0xbb95080>>
| | | | | | | | | | | <UIImageView: 0xbb97250; frame = (0 58; 266 2); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xbb972d0>> - (null)
| | | | | | | <UISearchBar: 0x10b6feb0; frame = (0 0; 266 44); text = ''; autoresize = W; gestureRecognizers = <NSArray: 0x10b704a0>; layer = <CALayer: 0x10b70040>>
| | | | | | | | <UIView: 0x10b70270; frame = (0 0.5; 266 43.5); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0x10b702d0>>
| | | | | | | | | <UISearchBarBackground: 0x10b707a0; frame = (0 0; 266 44); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10b708f0>> - (null)
| | | | | | | | | <UISearchBarTextField: 0x10b736a0; frame = (8 5; 250 33); text = ''; clipsToBounds = YES; opaque = NO; gestureRecognizers = <NSArray: 0x10bc36c0>; layer = <CALayer: 0x10b72d60>>
| | | | | | | | | | <UITextFieldBorderView: 0x10b7bc60; frame = (0 0; 250 33); opaque = NO; layer = <CALayer: 0x10b7bd70>>
| | | | | | | | | | <UIImageView: 0x10b76390; frame = (92.5 9.5; 12.5 12.5); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10b76410>> - Search
| | | | | | | | | | <UISearchBarTextFieldLabel: 0x10b7c580; frame = (112.5 0; 137.5 33); text = 'Search'; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10b7c6d0>>
| | | | | | | | | <UIView: 0xbb920f0; frame = (0 -1; 266 1); layer = <CALayer: 0xbb92150>>
| | | | | | | <UIImageView: 0x10b6c450; frame = (0 396.5; 266 3.5); alpha = 0; opaque = NO; autoresize = TM; userInteractionEnabled = NO; layer = <CALayer: 0x10b6c290>> - (null)
| | | | | | | <SessionTableHeaderView: 0x10bd1d30; frame = (0 44; 266 20); autoresize = W; layer = <CALayer: 0x10bd1db0>>
| | | | | | | | <UIImageView: 0x10bd1ec0; frame = (0 0; 266 20); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10bd1e50>> - (null)
| | | | | | | | <UILabel: 0x10bd2020; frame = (10 0; 246 20); userInteractionEnabled = NO; layer = <CALayer: 0x10bd1f70>>
| | | | | | | | <UILabel: 0x10bd2650; frame = (10 0; 236 20); text = 'Mar. 7 8:00am'; userInteractionEnabled = NO; layer = <CALayer: 0x10bd2290>>
| | | | | | | <SessionTableHeaderView: 0x10bd1830; frame = (0 184; 266 20); autoresize = W; layer = <CALayer: 0x10bd18b0>>
| | | | | | | | <UIImageView: 0x10bd23a0; frame = (0 0; 266 20); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10bd2420>> - (null)
| | | | | | | | <UILabel: 0x10bd2530; frame = (10 0; 246 20); userInteractionEnabled = NO; layer = <CALayer: 0x10bd25e0>>
| | | | | | | | <UILabel: 0x10bcead0; frame = (10 0; 236 20); text = 'Mar. 7 9:00am'; userInteractionEnabled = NO; layer = <CALayer: 0x10bd2db0>>
| | | | | | | <SessionTableHeaderView: 0x10bd3720; frame = (0 264; 266 20); autoresize = W; layer = <CALayer: 0x10bd37a0>>
| | | | | | | | <UIImageView: 0x10bd3890; frame = (0 0; 266 20); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x10bd3820>> - (null)
| | | | | | | | <UILabel: 0x10bd39f0; frame = (10 0; 246 20); userInteractionEnabled = NO; layer = <CALayer: 0x10bd3930>>
| | | | | | | | <UILabel: 0x10bd48c0; frame = (10 0; 236 20); text = 'Mar. 7 12:00pm'; userInteractionEnabled = NO; layer = <CALayer: 0x10bd4970>>
| | | | | | | <SessionTableHeaderView: 0xbb67e40; frame = (0 344; 266 20); autoresize = W; layer = <CALayer: 0xbbae740>>
| | | | | | | | <UIImageView: 0xbb97180; frame = (0 0; 266 20); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xbbae220>> - (null)
| | | | | | | | <UILabel: 0xbba2d90; frame = (10 0; 246 20); userInteractionEnabled = NO; layer = <CALayer: 0xbbae250>>
| | | | | | | | <UILabel: 0x10bd1510; frame = (10 0; 236 20); text = 'Mar. 7 1:00pm'; userInteractionEnabled = NO; layer = <CALayer: 0x10bd15c0>>
| | | | | | | <UIImageView: 0x10bc4f50; frame = (262.5 0; 3.5 400); alpha = 0; opaque = NO; autoresize = LM; userInteractionEnabled = NO; layer = <CALayer: 0x10bc5020>> - (null)
...
I gather the code you posted is part of the implementation of a custom UIView subclass you've created?
Why are you manipulating your superview's frame? That doesn't look right.
For a given view, its bounds are in its local coordinate system, and the view's frame is in the parent view's coordinate system. Manipulating a view's frame.origin moves the view inside its parent view. Manipulating a view's superview.frame would move the superview around in ITS superview, which does not look right, and could have unintended side-effects.
Since I never could determine why one of the sibling views (the parentViewController.rightDrawer in my case) was capturing all the touches instead of the overlay I just punted and came up with this solution:
When showing the overlay I add a UITapGestureRecognizer to the view that keeps grabbing the touches:
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:#selector(handleTap:)];
tap.delegate = self;
[self.parentViewController.rightDrawer addGestureRecognizer:tap];
Then have my handleTap function translate the CGPoints and fire the appropriate code:
- (void)handleTap:(UITapGestureRecognizer *)sender
{
if (sender.state == UIGestureRecognizerStateEnded)
{
CGPoint touchPoint = [sender.view convertPoint:[sender locationInView:[sender.view self]] toView:self.scanOverlay];
if (CGRectContainsPoint(self.bottomScanButton.frame, touchPoint)) {
[self bottomScanButtonPressed:self.bottomScanButton];
}
else if (CGRectContainsPoint(self.scanOverlay.closeButton.frame, touchPoint)) {
[self hideScanOverlayAnimated:YES didScan:NO];
}
else if (CGRectContainsPoint(self.scanOverlay.modeButton.frame, touchPoint)) {
[self.scanOverlay modeButtonPressed:self.scanOverlay.modeButton];
}
}
}
Since I only had three buttons that had any user interaction I just detect if the converted touchpoint is touching any of my controls and fire the correct logic.
Then when hiding my overlay I remove the tap recognizer:
// Remove the tap recognizer that was added to catch the taps coming from the right drawer
for (UIGestureRecognizer *recognizer in self.parentViewController.rightDrawer.gestureRecognizers) {
if([recognizer isKindOfClass:[UITapGestureRecognizer class]]) {
[self.parentViewController.rightDrawer removeGestureRecognizer:recognizer];
}
}
I could have created an iVar and only remove the one recognizer, but since I don't have any others I just nuke any UITapGestureRecognizer.
Kludgy, but I have a deadline. That's life unfortunately. Have to catch it on the next refactor.

Show Top ViewController

I am reading code for an app that contains 40+ ViewController. How would you know which ViewController is the current.
What I have tried:
CBIntrospect: execute a UIAlertView with a
message:NSStringFromClass([self class])?
looked at adding
something to NotificationCenter and act on some method when a view
controller is piped?
Using the runtime.h to dynamically add a
method?
Any idea is appreciated
Try this:
- (UIViewController *)topViewController
{
return [self topViewController:self.window.rootViewController];
}
- (UIViewController *)topViewController:(UIViewController *)viewController
{
if (viewController.presentedViewController == nil) {
return viewController;
}
if ([viewController.presentedViewController isKindOfClass:[UINavigationController class]]) {
UINavigationController *navigationController = (UINavigationController *) viewController.presentedViewController;
UIViewController *topViewController = [navigationController.viewControllers lastObject];
return [self topViewController:topViewController];
}
UIViewController *presentedViewController = viewController.presentedViewController;
return [self topViewController:presentedViewController];
}
I often use [self.window recursiveDescription] to print all UIViews through my app. This is not VC, but can be also useful to you.
Just set the breakpoint everywhere you need and type (replace window with your key "UIWindow"):
[window recursiveDescription]
You'll see common result:
<UIWindow: 0xc0275c0; frame = (0 0; 320 568); gestureRecognizers = <NSArray: 0xc027b20>; layer = <UIWindowLayer: 0xc0276e0>>
| <UILayoutContainerView: 0xc0196b0; frame = (0 0; 320 568); autoresize = W+H; gestureRecognizers = <NSArray: 0xc022fa0>; layer = <CALayer: 0xc019790>>
| | <UINavigationTransitionView: 0xc011a60; frame = (0 0; 320 568); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0xc00ebd0>>
| | | <UIViewControllerWrapperView: 0xb34ab10; frame = (0 0; 320 568); autoresize = W+H; layer = <CALayer: 0xb34abe0>>
| | | | <UIView: 0xc44a7c0; frame = (0 0; 320 568); autoresize = W+H; layer = <CALayer: 0xc44a820>>
| | | | | <UITableView: 0xdb4a000; frame = (0 0; 320 468); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0xc449ac0>; layer = <CALayer: 0xc448550>; contentOffset: {-0, -63}>
| | | | | | <UITableViewWrapperView: 0xc44a440; frame = (0 0; 320 468); autoresize = W+H; layer = <CALayer: 0xc44a510>>
| | | | | | | <WorkspaceCell: 0xc023a50; baseClass = UITableViewCell; frame = (0 1; 320 44); autoresize = W; layer = <CALayer: 0xc00cad0>>
| | | | | | | | <UITableViewCellScrollView: 0xc02c400; frame = (0 0; 320 44); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0xc02c980>; layer = <CALayer: 0xc02c610>; contentOffset: {0, 0}>
| | | | | | | | | <UITableViewCellContentView: 0xc022980; frame = (0 0; 320 43.5); opaque = NO; gestureRecognizers = <NSArray: 0xc02d2f0>; layer = <CALayer: 0xc02b0c0>>
| | | | | | | | | | <UIImageView: 0xc0233f0; frame = (15 7; 29 29); clipsToBounds = YES; autoresize = RM+TM+BM; userInteractionEnabled = NO; layer = <CALayer: 0xc0291e0>>
| | | | | | | | | | <UILabel: 0xc0262e0; frame = (60 11; 240 21); text = 'Alterplay'; clipsToBounds = YES; opaque = NO; autoresize = W+RM+TM+BM; userInteractionEnabled = NO; layer = <CALayer: 0xc0276a0>>
| | | | | | | | | | <UILabel: 0xc023130; frame = (15 7; 29 29); text = 'A'; clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; layer = <CALayer: 0xc0231d0>>
| | | | | | | | | <_UITableViewCellSeparatorView: 0xc02e4e0; frame = (0 43.5; 320 0.5); layer = <CALayer: 0xc02e5b0>>
| | | | | | | | | <_UITableViewCellSeparatorView: 0xc02e850; frame = (0 0; 320 0.5); layer = <CALayer: 0xc02e8c0>>
| | | | | | <UIImageView: 0xc449210; frame = (0 465.5; 320 3.5); alpha = 0; opaque = NO; autoresize = TM; userInteractionEnabled = NO; layer = <CALayer: 0xc4494a0>>
| | | | | | <UIImageView: 0xc449680; frame = (316.5 414; 3.5 55); alpha = 0; opaque = NO; autoresize = LM; userInteractionEnabled = NO; layer = <CALayer: 0xc449760>>
| | | | | <UIView: 0xc44a850; frame = (0 518; 320 50); autoresize = W+TM; layer = <CALayer: 0xc44a8b0>>
| | | | | | <UIButton: 0xc4458a0; frame = (75 14; 172 22); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0xc4459d0>>
| | | | | | | <UIImageView: 0xb359ce0; frame = (27.5 4; 117 14); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xb359560>>
| | | | | <UIView: 0xc44a9f0; frame = (0 468; 320 50); autoresize = LM+RM+TM; layer = <CALayer: 0xc44aa50>>
| | | | | | <UIButton: 0xc447b10; frame = (101 10; 119 30); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0xc447c00>>
| | | | | | | <UIButtonLabel: 0xb34c1a0; frame = (32 3; 55 24); text = 'Logout'; clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xb34c2b0>>
| | | | | <UIImageView: 0xc44ab00; frame = (0 424; 320 44); clipsToBounds = YES; opaque = NO; autoresize = LM+RM+TM; layer = <CALayer: 0xc44ab90>>
| | <UINavigationBar: 0xc019980; frame = (0 20; 320 44); opaque = NO; autoresize = W; gestureRecognizers = <NSArray: 0xc01b9f0>; layer = <CALayer: 0xc019ae0>>
| | | <_UINavigationBarBackground: 0xc01a180; frame = (0 -20; 320 64); opaque = NO; autoresize = W; userInteractionEnabled = NO; layer = <CALayer: 0xc01a2b0>>
| | | | <_UIBackdropView: 0xc01c0d0; frame = (0 0; 320 64); opaque = NO; autoresize = W+H; userInteractionEnabled = NO; layer = <_UIBackdropViewLayer: 0xc01dca0>>
| | | | | <_UIBackdropEffectView: 0xc01e6b0; frame = (0 0; 320 64); clipsToBounds = YES; opaque = NO; autoresize = W+H; userInteractionEnabled = NO; layer = <CABackdropLayer: 0xc01e970>>
| | | | | <UIView: 0xc01f2a0; frame = (0 0; 320 64); hidden = YES; opaque = NO; autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0xc01f400>>
| | | | <UIImageView: 0xc01a540; frame = (0 64; 320 0.5); userInteractionEnabled = NO; layer = <CALayer: 0xc01a610>>
| | | <UINavigationItemView: 0xc023490; frame = (111.5 8; 97.5 27); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xc023570>>
| | | | <UILabel: 0xc023920; frame = (0 3; 97.5 22); text = 'Workspaces'; clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xc023a20>>
| | | <_UINavigationBarBackIndicatorView: 0xc029150; frame = (8 12; 12.5 20.5); alpha = 0; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xc029240>>

How to connect a container view to a childviewcontroller.view

On IOS 5.1 I have added a container view to a viewcontroller on storyboard. I want to connect that container view via IBOutlet, so I can manage it easily on IB.
I have tried to use a regular UIView:
#property (nonatomic,weak) IBOutlet UIView *leftView; //connected this to container view on interface builder
then, if I use this, it doesn't work
[self.leftView addSubview:tableVC.view];
If I add a childview controller programmatically it works but it covers full screen of course.
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
UIStoryboard* sb = [UIStoryboard storyboardWithName:#"MainStoryboard"
bundle:nil];
UITableViewController *tableVC = [sb instantiateViewControllerWithIdentifier:#"LogMasterViewController"];
[self.view addSubview:tableVC.view];
[self addChildViewController:tableVC];
[tableVC didMoveToParentViewController:self];
}
How can I connect container view to child view controller?
I just tested the following and it works fine:
- (void)viewDidLoad
{
[super viewDidLoad];
UIStoryboard* sb = [UIStoryboard storyboardWithName:#"MainStoryboard"
bundle:nil];
UITableViewController *tableVC = [sb instantiateViewControllerWithIdentifier:#"LogMasterViewController"];
[self.leftView addSubview:tableVC.view];
tableVC.view.frame = self.leftView.bounds;
[self addChildViewController:tableVC];
[tableVC didMoveToParentViewController:self];
}
A couple of thoughts:
If your LogMasterViewController is not a UITableViewController, but rather a view controller with a UITableView on it, you might want to make sure that you don't have autolayout or autosizing constraints on that tableview that make it resize the tableview to something that you can no longer see.
You might want to run the app, pause it after the app has finished presenting the screen (I put a breakpoint in viewDidAppear ... anything after that point should also work too, but don't do viewDidLoad or viewWillAppear) with the LogMasterViewController in self.leftView and then type the following command in the debugger console:
po [[UIWindow keyWindow] recursiveDescription]
You might want to give your leftView and the main view of LogMasterViewController unique tag numbers so you can more easily decipher the output. Anyway, use this recursiveDescription to identify whether the table view has been presented, but simply in a fashion so you cannot see the table, or whether it's not added at all. You can also confirm that your leftView (with its unique tag number, if you gave it one) is there, too.
(lldb) po [[UIWindow keyWindow] recursiveDescription]
$0 = 0x071a7a60 <UIWindow: 0x758e7a0; frame = (0 0; 320 480); autoresize = W+H; layer = <UIWindowLayer: 0x75ab340>>
| <UIView: 0x71a8480; frame = (0 20; 320 460); autoresize = RM+BM; tag = 1; layer = <CALayer: 0x71a84e0>>
| | <UIView: 0x71a8ce0; frame = (0 0; 160 460); autoresize = TM+BM; tag = 2; layer = <CALayer: 0x71a8510>>
| | | <UITableView: 0x7a9d400; frame = (0 0; 160 460); clipsToBounds = YES; opaque = NO; autoresize = W+H; tag = 3; gestureRecognizers = <NSArray: 0x71aba30>; layer = <CALayer: 0x71ab100>; contentOffset: {0, 0}>
| | | | <UITableViewCell: 0x71bbd50; frame = (0 396; 160 44); text = 'Row 10'; autoresize = W; layer = <CALayer: 0x71bbe80>>
| | | | | <UITableViewCellContentView: 0x71bbeb0; frame = (0 0; 160 43); gestureRecognizers = <NSArray: 0x71bc100>; layer = <CALayer: 0x71bbf10>>
| | | | | | <UILabel: 0x71bc1e0; frame = (10 0; 140 43); text = 'Row 10'; clipsToBounds = YES; userInteractionEnabled = NO; layer = <CALayer: 0x71bbd20>>
| | | | | <UIView: 0x71bc5c0; frame = (0 43; 160 1); autoresize = W+TM; layer = <CALayer: 0x71bb560>>
| | | | <UITableViewCell: 0x71bb5c0; frame = (0 352; 160 44); text = 'Row 9'; autoresize = W; layer = <CALayer: 0x71bb6f0>>
| | | | | <UITableViewCellContentView: 0x71bb720; frame = (0 0; 160 43); gestureRecognizers = <NSArray: 0x71bb970>; layer = <CALayer: 0x71bb780>>
| | | | | | <UILabel: 0x71bba50; frame = (10 0; 140 43); text = 'Row 9'; clipsToBounds = YES; userInteractionEnabled = NO; layer = <CALayer: 0x71bb590>>
| | | | | <UIView: 0x71bc560; frame = (0 43; 160 1); autoresize = W+TM; layer = <CALayer: 0x71bae50>>
| | | | <UITableViewCell: 0x71baeb0; frame = (0 308; 160 44); text = 'Row 8'; autoresize = W; layer = <CALayer: 0x71bafe0>>
| | | | | <UITableViewCellContentView: 0x71bb010; frame = (0 0; 160 43); gestureRecognizers = <NSArray: 0x71bb260>; layer = <CALayer: 0x71bb070>>
| | | | | | <UILabel: 0x71bb340; frame = (10 0; 140 43); text = 'Row 8'; clipsToBounds = YES; userInteractionEnabled = NO; layer = <CALayer: 0x71bae80>>
| | | | | <UIView: 0x71bc500; frame = (0 43; 160 1); autoresize = W+TM; layer = <CALayer: 0x71ba740>>
| | | | <UITableViewCell: 0x71ba7a0; frame = (0 264; 160 44); text = 'Row 7'; autoresize = W; layer = <CALayer: 0x71ba8d0>>
| | | | | <UITableViewCellContentView: 0x71ba900; frame = (0 0; 160 43); gestureRecognizers = <NSArray: 0x71bab50>; layer = <CALayer: 0x71ba960>>
| | | | | | <UILabel: 0x71bac30; frame = (10 0; 140 43); text = 'Row 7'; clipsToBounds = YES; userInteractionEnabled = NO; layer = <CALayer: 0x71ba770>>
| | | | | <UIView: 0x71bc4a0; frame = (0 43; 160 1); autoresize = W+TM; layer = <CALayer: 0x71ba030>>
| | | | <UITableViewCell: 0x71ba090; frame = (0 220; 160 44); text = 'Row 6'; autoresize = W; layer = <CALayer: 0x71ba1c0>>
| | | | | <UITableViewCellContentView: 0x71ba1f0; frame = (0 0; 160 43); gestureRecognizers = <NSArray: 0x71ba440>; layer = <CALayer: 0x71ba250>>
| | | | | | <UILabel: 0x71ba520; frame = (10 0; 140 43); text = 'Row 6'; clipsToBounds = YES; userInteractionEnabled = NO; layer = <CALayer: 0x71ba060>>
| | | | | <UIView: 0x71b8a70; frame = (0 43; 160 1); autoresize = W+TM; layer = <CALayer: 0x71b9910>>
| | | | <UITableViewCell: 0x71b9970; frame = (0 176; 160 44); text = 'Row 5'; autoresize = W; layer = <CALayer: 0x71b9aa0>>
| | | | | <UITableViewCellContentView: 0x71b9ad0; frame = (0 0; 160 43); gestureRecognizers = <NSArray: 0x71b9d20>; layer = <CALayer: 0x71b9b30>>
| | | | | | <UILabel: 0x71b9e00; frame = (10 0; 140 43); text = 'Row 5'; clipsToBounds = YES; userInteractionEnabled = NO; layer = <CALayer: 0x71b9940>>
| | | | | <UIView: 0x71b8010; frame = (0 43; 160 1); autoresize = W+TM; layer = <CALayer: 0x71b9200>>
| | | | <UITableViewCell: 0x71b9260; frame = (0 132; 160 44); text = 'Row 4'; autoresize = W; layer = <CALayer: 0x71b9390>>
| | | | | <UITableViewCellContentView: 0x71b93c0; frame = (0 0; 160 43); gestureRecognizers = <NSArray: 0x71b9610>; layer = <CALayer: 0x71b9420>>
| | | | | | <UILabel: 0x71b96f0; frame = (10 0; 140 43); text = 'Row 4'; clipsToBounds = YES; userInteractionEnabled = NO; layer = <CALayer: 0x71b9230>>
| | | | | <UIView: 0x71bb4f0; frame = (0 43; 160 1); autoresize = W+TM; layer = <CALayer: 0x71b8af0>>
| | | | <UITableViewCell: 0x71b8b50; frame = (0 88; 160 44); text = 'Row 3'; autoresize = W; layer = <CALayer: 0x71b8c80>>
| | | | | <UITableViewCellContentView: 0x71b8cb0; frame = (0 0; 160 43); gestureRecognizers = <NSArray: 0x71b8f00>; layer = <CALayer: 0x71b8d10>>
| | | | | | <UILabel: 0x71b8fe0; frame = (10 0; 140 43); text = 'Row 3'; clipsToBounds = YES; userInteractionEnabled = NO; layer = <CALayer: 0x71b8b20>>
| | | | | <UIView: 0x71bade0; frame = (0 43; 160 1); autoresize = W+TM; layer = <CALayer: 0x71b8090>>
| | | | <UITableViewCell: 0x71b80f0; frame = (0 44; 160 44); text = 'Row 2'; autoresize = W; layer = <CALayer: 0x71b8220>>
| | | | | <UITableViewCellContentView: 0x71b8250; frame = (0 0; 160 43); gestureRecognizers = <NSArray: 0x71b85a0>; layer = <CALayer: 0x71b82b0>>
| | | | | | <UILabel: 0x71b8790; frame = (10 0; 140 43); text = 'Row 2'; clipsToBounds = YES; userInteractionEnabled = NO; layer = <CALayer: 0x71b8630>>
| | | | | <UIView: 0x71ba6d0; frame = (0 43; 160 1); autoresize = W+TM; layer = <CALayer: 0x71b9fe0>>
| | | | <UITableViewCell: 0x71b4d30; frame = (0 0; 160 44); text = 'Row 1'; autoresize = W; layer = <CALayer: 0x71b4e80>>
| | | | | <UITableViewCellContentView: 0x71b4fb0; frame = (0 0; 160 43); gestureRecognizers = <NSArray: 0x71b5b80>; layer = <CALayer: 0x71b5040>>
| | | | | | <UILabel: 0x71b65d0; frame = (10 0; 140 43); text = 'Row 1'; clipsToBounds = YES; userInteractionEnabled = NO; layer = <CALayer: 0x71b66e0>>
| | | | | <UIView: 0x71b98a0; frame = (0 43; 160 1); autoresize = W+TM; layer = <CALayer: 0x71bbca0>>
| | | | <UIImageView: 0x71ac5d0; frame = (0 453; 320 7); alpha = 0; opaque = NO; autoresize = TM; userInteractionEnabled = NO; layer = <CALayer: 0x71ac700>>
| | | | <_UITableViewSeparatorView: 0x71b3a90; frame = (0 483; 160 1); opaque = NO; autoresize = W; layer = <CALayer: 0x71b3b10>>
| | | | <_UITableViewSeparatorView: 0x71b3dd0; frame = (0 527; 160 1); opaque = NO; autoresize = W; layer = <CALayer: 0x71b3e30>>
| | | | <_UITableViewSeparatorView: 0x71b3e60; frame = (0 571; 160 1); opaque = NO; autoresize = W; layer = <CALayer: 0x71b3ec0>>
| | | | <_UITableViewSeparatorView: 0x71b3ef0; frame = (0 615; 160 1); opaque = NO; autoresize = W; layer = <CALayer: 0x71b3f50>>
| | | | <_UITableViewSeparatorView: 0x71b3f80; frame = (0 659; 160 1); opaque = NO; autoresize = W; layer = <CALayer: 0x71b3fe0>>
| | | | <_UITableViewSeparatorView: 0x71b4030; frame = (0 703; 160 1); opaque = NO; autoresize = W; layer = <CALayer: 0x71b4090>>
| | | | <UIImageView: 0x71ac810; frame = (153 541; 7 7); alpha = 0; opaque = NO; autoresize = LM; userInteractionEnabled = NO; layer = <CALayer: 0x71ac8b0>>
In this example, I gave my main view of my root controller a tag of "1", leftView has a tag of "2", and the main view of LogMasterViewController has a tag of "3". In this case, these show up as the second, third, and fourth lines of my output (and I also see my UITableViewCells listed below).

Tweet/Share style textbox on iOS

The "textboxes" that appear when clicking Tweet or Share for Twitter and Facebook. What are those made of? Can something similar be made? I am trying to customize them so that it will function as "comment" for a tableView. I'm talking of these two:
I am trying to make it say "Comment" instead of "Tweet" and "Facebook".. And then "Done" where it says "Send" and "Post". Any idea how/where I can create/customize these?
These are private view controllers. You can’t (well, shouldn’t) customize them—you’ll have to reimplement them yourself.
You can however, use the private method -recursiveDescription to get an idea of how the view hierarchy’s constructed. Create a simple app that shares some text using UIActivityViewController. Present it, pick Twitter or Facebook, then pause the app in the debugger. Type po [[[UIApplication sharedApplication] keyWindow] recursiveDescription] into the console to list the current view hierarchy.
EDIT: Ok, I was curious…
| <UIImageView: 0x75c7830; frame = (0 0; 320 568); opaque = NO; autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0x75c7890>>
| <UIView: 0x75c7900; frame = (0 20; 320 548); opaque = NO; autoresize = LM+W+RM+H; layer = <CALayer: 0x75c7960>>
| | <SLTwitterSheetCardView: 0x75b4950; frame = (-9 25; 337 188); opaque = NO; autoresize = W+H; layer = <CALayer: 0x75b4a40>>
| | | <UIView: 0x75c86b0; frame = (13 0; 311 188); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0x75c8710>>
| | | | <UIImageView: 0x767b680; frame = (0 3; 311 184); clipsToBounds = YES; alpha = 0.75; opaque = NO; autoresize = W+TM+H; userInteractionEnabled = NO; layer = <CALayer: 0x767e4a0>>
| | | | <UIImageView: 0x7678a50; frame = (0 0; 311 188); opaque = NO; autoresize = W+H+BM; userInteractionEnabled = NO; layer = <CALayer: 0x767b8b0>>
| | | | <UIView: 0x75c8770; frame = (0 0; 311 188); autoresize = W+H; layer = <CALayer: 0x75c87d0>>
| | | | | <SLTwitterExpandedHitTestView: 0x767d950; frame = (6 155; 303 26); opaque = NO; autoresize = RM+TM; layer = <CALayer: 0x767da00>>
| | | | | | <SLTwitterExpandedHitTestImageView: 0x767ea60; baseClass = UIImageView; frame = (30 -6; 272 42); alpha = 0; autoresize = RM+BM; userInteractionEnabled = NO; layer = <CALayer: 0x767eb10>>
| | | | | | <SLTwitterExpandedHitTestButton: 0x767a4e0; baseClass = UIButton; frame = (5 5; 21 21); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x767a5a0>>
| | | | | | | <UIImageView: 0x7176770; frame = (0 0; 21 21); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x719cb70>>
| | | | | | | <UIButtonLabel: 0x767c680; frame = (0 0; 0 0); clipsToBounds = YES; hidden = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x767bbe0>>
| | | | | | <SLTwitterExpandedHitTestButton: 0x7193d10; baseClass = UIButton; frame = (120 7; 17 17); alpha = 0; opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x7193660>>
| | | | | | | <UIImageView: 0x7172000; frame = (0 0; 17 17); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x719da50>>
| | | | | | | <UIButtonLabel: 0x7194900; frame = (0 0; 0 0); clipsToBounds = YES; hidden = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x71949a0>>
| | | | | | <SLTwitterExpandedHitTestButton: 0x767d1a0; baseClass = UIButton; frame = (29 -1; 84 37); alpha = 0.8; opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x767d260>>
| | | | | | | <UIButtonLabel: 0x767d580; frame = (0 9; 84 16); text = 'Add Location'; clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x767d620>>
| | | | <UIView: 0x7678160; frame = (0 0; 311 188); opaque = NO; autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0x76781c0>>
| | | <UIImageView: 0x7680aa0; frame = (0 -34; 337 255); opaque = NO; autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0x7680b00>>
| | | <UILabel: 0x75b4bb0; frame = (282 157; 29 29); text = '132'; clipsToBounds = YES; alpha = 0.7; opaque = NO; autoresize = LM+TM; userInteractionEnabled = NO; layer = <CALayer: 0x75b4c40>>
| | | <UIView: 0x75b5da0; frame = (14 41; 309 3); opaque = NO; autoresize = W+BM; layer = <CALayer: 0x75b5e00>>
| | | <UIButton: 0x75b33e0; frame = (20 7; 64 30); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x75b34a0>>
| | | | <UIImageView: 0x719c910; frame = (0 0; 64 30); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x716f230>>
| | | | <UIButtonLabel: 0x75b37d0; frame = (12 7; 40 15); text = 'Cancel'; clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x75b3870>>
| | | <UIButton: 0x75b3a60; frame = (265 7; 52 30); alpha = 0; opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x75b3b20>>
| | | | <UIImageView: 0x767dc40; frame = (0 0; 52 30); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x76890a0>>
| | | | <UIButtonLabel: 0x75b3c20; frame = (6 7; 40 15); text = 'Cancel'; clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x75b3cc0>>
| | | <UIButton: 0x75b3ef0; frame = (263 7; 54 30); opaque = NO; autoresize = LM+BM; layer = <CALayer: 0x75b3fb0>>
| | | | <UIImageView: 0x768f4f0; frame = (0 0; 54 30); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x768eb60>>
| | | | <UIButtonLabel: 0x75b40e0; frame = (12 7; 30 15); text = 'Send'; clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x75b4180>>
| | | <UILabel: 0x75c6d40; frame = (139 5; 59 32); text = 'Tweet'; clipsToBounds = YES; opaque = NO; autoresize = W+BM; userInteractionEnabled = NO; layer = <CALayer: 0x75c6a10>>
| | | <UIView: 0x7191800; frame = (14 43; 311 112); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0x71952a0>>
| | | | <UITextView: 0x8227400; frame = (0 0; 311 112); text = 'NSString'; opaque = NO; autoresize = W+H; gestureRecognizers = <NSArray: 0x75b6ff0>; layer = <CALayer: 0x75b6990>; contentOffset: {-0, 10}>
| | | | | <UITextSelectionView: 0x75b6bf0; frame = (0 0; 0 0); userInteractionEnabled = NO; layer = <CALayer: 0x75b6ca0>>
| | | | | <UIImageView: 0x75b71e0; frame = (0 105; 217 7); alpha = 0; opaque = NO; autoresize = TM; userInteractionEnabled = NO; layer = <CALayer: 0x75b7280>>
| | | | | <UIImageView: 0x75b7320; frame = (304 70; 7 37); alpha = 0; opaque = NO; autoresize = LM; userInteractionEnabled = NO; layer = <CALayer: 0x75b73c0>>
| | | | | <UIWebDocumentView: 0x8227800; frame = (0 0; 311 45); text = 'NSString'; opaque = NO; userInteractionEnabled = NO; gestureRecognizers = <NSArray: 0x75bc490>; layer = <UIWebLayer: 0x75bb0d0>>
| | | | | | <TileHostLayer: 0x75bb770> (layer)
| | | | | | | <TileLayer: 0x75c7270> (layer)
| | | | | <UITextSelectionView: 0x75c6220; frame = (0 0; 0 0); userInteractionEnabled = NO; layer = <CALayer: 0x75c62a0>>
| | | | | | <UIView: 0x75a09b0; frame = (75 9; 3 24); alpha = 0; userInteractionEnabled = NO; layer = <CALayer: 0x75bde40>>
| | | | | <UIView: 0x75b5f10; frame = (-1 41; 311 3); alpha = 0; opaque = NO; autoresize = W+BM; layer = <CALayer: 0x75b5f70>>
| | | | | <UIView: 0x8a6ebc0; frame = (0 -216; 313 1); opaque = NO; layer = <CALayer: 0x8a6e750>>
| | | | | <UIView: 0x8a6ec50; frame = (0 -188; 313 1); opaque = NO; layer = <CALayer: 0x8a6e600>>
| | | | | <UIView: 0x8a6e630; frame = (0 -160; 313 1); opaque = NO; layer = <CALayer: 0x8a6e690>>
| | | | | <UIView: 0x8a6e6c0; frame = (0 -132; 313 1); opaque = NO; layer = <CALayer: 0x8a6ecd0>>
| | | | | <UIView: 0x8a6ed00; frame = (0 -104; 313 1); opaque = NO; layer = <CALayer: 0x8a6ed60>>
| | | | | <UIView: 0x8a6ed90; frame = (0 -76; 313 1); opaque = NO; layer = <CALayer: 0x8a6edf0>>
| | | | | <UIView: 0x8a6ee20; frame = (0 -48; 313 1); opaque = NO; layer = <CALayer: 0x8a6ee80>>
| | | | | <UIView: 0x8a6ef10; frame = (0 -20; 313 1); opaque = NO; layer = <CALayer: 0x8a6eeb0>>
| | | | | <UIView: 0x8a6ef70; frame = (0 8; 313 1); opaque = NO; layer = <CALayer: 0x8a6efd0>>
| | | | | <UIView: 0x8a6f000; frame = (0 36; 313 1); opaque = NO; layer = <CALayer: 0x8a6f060>>
| | | | | <UIView: 0x8a6f090; frame = (0 64; 313 1); opaque = NO; layer = <CALayer: 0x8a6f0f0>>
| | | | | <UIView: 0x8a6f120; frame = (0 92; 313 1); opaque = NO; layer = <CALayer: 0x8a6f180>>
| | | | | <UIView: 0x8a6f1b0; frame = (0 120; 313 1); opaque = NO; layer = <CALayer: 0x8a6f210>>
| | | | | <UIView: 0x8a6f240; frame = (0 148; 313 1); opaque = NO; layer = <CALayer: 0x8a6f2a0>>
| | | <UIImageView: 0x75b5110; frame = (251 43; 79 34); alpha = 0; autoresize = LM+BM; userInteractionEnabled = NO; layer = <CALayer: 0x75b5170>>
Basically, it’s what you’d expect: a bunch of background images, a label and buttons to fake the navigation bar style and a big text view for content.

Resources