Mercurial > dwindows
comparison ios/dw.m @ 2401:010ae32a5067
iOS: Hide the UITransitionView that is attached to the UIWindow.
Probably I should be using this for some sort of transition before display,
but I am not sure how to do that yet... and its existance blocks access to
the displayed controls. I tried removing the view but that seems to prevent
us from getting the events for redisplay during rotation. So hide it.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 27 Mar 2021 19:18:36 +0000 |
parents | 5e454dfab0db |
children | b28852b35452 |
comparison
equal
deleted
inserted
replaced
2400:5e454dfab0db | 2401:010ae32a5067 |
---|---|
1113 -(void)viewWillLayoutSubviews | 1113 -(void)viewWillLayoutSubviews |
1114 { | 1114 { |
1115 DWWindow *window = (DWWindow *)[[self view] window]; | 1115 DWWindow *window = (DWWindow *)[[self view] window]; |
1116 NSArray *array = [window subviews]; | 1116 NSArray *array = [window subviews]; |
1117 DWView *view = [array firstObject]; | 1117 DWView *view = [array firstObject]; |
1118 /* Hide the UITransitionView which is blocking the screen... | |
1119 * This is probably not the correct solution, but it solves the | |
1120 * problem for the moment. Figure out what to do with this view. | |
1121 */ | |
1122 id object = [array lastObject]; | |
1123 if(![object isMemberOfClass:[DWView class]]) | |
1124 [object setHidden:YES]; | |
1118 [view setFrame:[window frame]]; | 1125 [view setFrame:[window frame]]; |
1119 [view windowResized:[window frame].size]; | 1126 [view windowResized:[window frame].size]; |
1120 } | 1127 } |
1121 @end | 1128 @end |
1122 | 1129 |
3371 } | 3378 } |
3372 | 3379 |
3373 /* Internal function to create a basic button, used by all button types */ | 3380 /* Internal function to create a basic button, used by all button types */ |
3374 HWND _dw_internal_button_new(const char *text, ULONG cid) | 3381 HWND _dw_internal_button_new(const char *text, ULONG cid) |
3375 { | 3382 { |
3376 DWButton *button = [[DWButton alloc] init]; | 3383 DWButton *button = [[DWButton buttonWithType:UIButtonTypeRoundedRect] retain]; |
3377 if(text) | 3384 if(text) |
3378 { | 3385 { |
3379 [button setTitle:[NSString stringWithUTF8String:text] forState:UIControlStateNormal]; | 3386 [button setTitle:[NSString stringWithUTF8String:text] forState:UIControlStateNormal]; |
3380 } | 3387 } |
3381 [button addTarget:button | 3388 [button addTarget:button |
3382 action:@selector(buttonClicked:) | 3389 action:@selector(buttonClicked:) |
3383 forControlEvents:UIControlEventPrimaryActionTriggered]; | 3390 forControlEvents:UIControlEventTouchUpInside]; |
3384 [button setTag:cid]; | 3391 [button setTag:cid]; |
3385 if(DWDefaultFont) | 3392 if(DWDefaultFont) |
3386 { | 3393 { |
3387 [[button titleLabel] setFont:DWDefaultFont]; | 3394 [[button titleLabel] setFont:DWDefaultFont]; |
3388 } | 3395 } |