IOS uiview框架没有更新

时间:2016-04-07 02:28:09

标签: ios objective-c uiview

您好我尝试将新的帧大小分配给分隔符uiview,但它没有改变,我不知道为什么,我尝试调试并且newFrame有一个新值但是在分配给分隔符之后,分隔符看起来像永远不会收到新值

UIView *separator = (UIView *)[cell viewWithTag: 10];
CGRect newFrame;
    if(lblBuyPrice.frame.origin.x > lblBuyQuantity.frame.origin.x){
        newFrame = CGRectMake( lblBuyQuantity.frame.origin.x, separatorBuy.frame.origin.y, lblBuyQuantity.frame.size.width, separatorBuy.frame.size.height);
    }else{
        newFrame = CGRectMake( lblBuyPrice.frame.origin.x, separatorBuy.frame.origin.y, lblBuyPrice.frame.size.width, separatorBuy.frame.size.height);
    }
    separatorBuy.frame = newFrame;

uiview元素位于单元格内

0 个答案:

没有答案