问题描述
我无法弄明白......我正在玩
I can't figure this out... I'm playing with
- [UIBezierPath bezierPathWithRoundedRect:byRoundingCorners:cornerRadii:]
这样:
bezierPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(10, 10, 80, 80)
byRoundingCorners:(UIRectCornerBottomLeft)
cornerRadii:CGSizeMake(20, 20)];
它按预期工作。但是如果我用cornerRadii替换:CGSizeMake(20,20),比如说, cornerRadii:CGSizeMake(20,5)
或 CGSizeMake(20,40)
,没有区别。
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.
为什么cornerRadii CGSize
而不是 CGFloat
然后呢?什么是 CGSize.height
for?
Why is cornerRadii CGSize
and not CGFloat
then? What is CGSize.height
for?
任何想法和建议将不胜感激:)
Any ideas and advice will be greatly appreciated :)
推荐答案
经过进一步的测试后,我终于发现它似乎是一个iOS 7的bug。正如预期的那样,iOS 6模拟器上的相同代码正确绘制。然而,iOS 7模拟器和iOS 7设备都有这个问题并且绘制不正确。
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.
这篇关于为什么CGSize的cornerRadii参数类型为 - [UIBezierPath bezierPathWithRoundedRect:byRoundingCorners:cornerRadii:]?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!