Objective c ruby motion在UISplitViewController上隐藏圆角

Objective c ruby motion在UISplitViewController上隐藏圆角,objective-c,uisplitviewcontroller,rubymotion,Objective C,Uisplitviewcontroller,Rubymotion,我已经找到了Objective-c,我需要这样做,但是您如何用ruby重新编写它 - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { [self performSelector:@selector(fixRoundedSplitViewCorner) withObject:NULL afterDelay:0]; } -(void) fixRounde

我已经找到了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)];
        }
    }
}
-(void)从InterfaceOrientation(接口方向)中删除了RotateFromInterfaceOrientation:(UIInterfaceOrientation)
{  
[self-performSelector:@selector(fixRoundedSplitViewCorner)with object:NULL afterDelay:0];
}
-(void)fixRoundedSplitViewCorner{
[自分解:[[UIApplication sharedApplication]keyWindow]级别:0];
}
-(无效)分解:(id)视图级别:(int)级别
{   
if([aView iskindof类:[UIImageView类]]){
UIImageView*roundedCornerImage=(UIImageView*)视图;
roundedCornerImage.hidden=是;
}
如果(级别<2)
{
对于(UIView*子视图在[aView子视图]中){
[自分解:子视图层级:(层级+1)];
}
}
}

像这样的东西怎么样:

def didRotateFromInterfaceOrientation(fromInterfaceOrientation)
# you can just skip calling performSelector and call the method directly
#   self.performSelector('fixRoundedSplitViewCorner', withObject:nil, afterDelay:0)
    self.fixRoundedSplitViewCorner()
end

def fixRoundedSplitViewCorner
    self.explode(UIApplication.sharedApplication.keyWindow, level:0)
end

def explode(aView, level:level)
    if aView.class == UIImageView
        aView.hidden = true
    end
    if level < 2
        for subview in aView.subviews
            self.explode(subview, level:(level + 1))
        end
    end
end
def didRotateFromInterfaceOrientation(来自InterfaceOrientation)
#您可以跳过调用PerformSelect,直接调用该方法
#self.performSelector('fixRoundedSplitViewCorner',对象:nil,后延迟:0)
self.fixRoundedSplitViewCorner()
结束
def fixRoundedSplitViewCorner
self.explode(UIApplication.sharedApplication.keyWindow,级别:0)
结束
def爆炸(视图,级别:级别)
如果aView.class==UIImageView
aView.hidden=true
结束
如果级别<2
对于aView.subview中的子视图
自我分解(子视图,级别:(级别+1))
结束
结束
结束