sammcewan / WYPopoverController

WYPopoverController is for the presentation of content in popover on iPhone / iPad devices. Very customizable.
Other
252 stars 74 forks source link

iOS8 + iPhone 6+: crash in drawRect #65

Open g0re opened 9 years ago

g0re commented 9 years ago

In WYPopoverController.m, drawRect:

CGRect innerRect = CGRectMake(CGRectGetMinX(rect), CGRectGetMinY(rect) + barHeight, CGRectGetWidth(rect) , CGRectGetHeight(rect) - barHeight);

If innerRect.size.width or innerRect.size.height is 0, the code crashes when creating UIBeizerPath

UIBezierPath* inRoundedRectPath = [UIBezierPath bezierPathWithRoundedRect:CGRectInset(innerRect, 0.5, 0.5) cornerRadius:cornerRadius];

This happens to me only when testing the code in iOS8 + iPhone 6+.