我找到了我需要这样做的 Objective-c 但是你将如何用 ruby 重写它?
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
[self performSelector:@selector(fixRoundedSplitViewCorner) withObject:NULL afterDelay:0];
}
-(void) fixRoundedSplitViewCorner {
[self explode:[[UIApplication sharedApplication] keyWindow] level:0];
}
-(void) explode:(id)aView level:(int)level
{
if ([aView isKindOfClass:[UIImageView class]]) {
UIImageView* roundedCornerImage = (UIImageView*)aView;
roundedCornerImage.hidden = YES;
}
if (level < 2)
{
for (UIView *subview in [aView subviews]) {
[self explode:subview level:(level + 1)];
}
}
}