iosuikituibezierpath

Why is cornerRadii parameter of CGSize type in -[UIBezierPath bezierPathWithRoundedRect:byRoundingCorners:cornerRadii:]?


I can't figure this out... I'm playing with

-[UIBezierPath bezierPathWithRoundedRect:byRoundingCorners:cornerRadii:] as such:

bezierPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(10, 10, 80, 80)
                                   byRoundingCorners:(UIRectCornerBottomLeft)
                                         cornerRadii:CGSizeMake(20, 20)];

And it works as expected. But if I replace cornerRadii:CGSizeMake(20, 20) with, say, cornerRadii:CGSizeMake(20, 5) or CGSizeMake(20, 40), there's no difference.

Why is cornerRadii CGSize and not CGFloat then? What is CGSize.height for?

Any ideas and advice will be greatly appreciated :)

enter image description here enter image description here


Solution

  • Well, after further tests I finally found that it seems to be an iOS 7 bug. The same code on iOS 6 simulator draws properly, as expected. however, both iOS 7 simulator and iOS 7 device have this issue and draw improperly.

    I'll file a bug report, unless someone proves me wrong and there is something I am missing.