IgniteEngine-iOS icon indicating copy to clipboard operation
IgniteEngine-iOS copied to clipboard

Deprecate IXCircle and add support for proper corner radius (border.radius) on all applicable controls

Open brandonscript opened this issue 10 years ago • 0 comments

If you set the border radius to {{[[$self.size.w]] / 2}}, the control becomes a circle. This works for almost every control, except those with subviews. All subviews should support the border radius property, e.g.:

if ([[self attributeContainer] getFloatValueForAttribute:kIXBorderRadius defaultValue:0.0f] > 0) {
    [self pictureView].backgroundColor = [UIColor clearColor];
    [self pictureView].layer.cornerRadius = [[self attributeContainer] getFloatValueForAttribute:kIXBorderRadius defaultValue:0.0f];
    [self pictureView].layer.masksToBounds = YES;
}

brandonscript avatar Nov 02 '15 17:11 brandonscript