Setting exclusionPath that covers full width of text container clips all text

Originator:johankool
Number:rdar://15761045 Date Originated:07-Jan-2014 06:25 PM
Status:Duplicate of 14445045 (Open) Resolved:
Product:iOS SDK Product Version:iOS 7.0.4 (11B554a)
Classification: Reproducible:
 
Summary:
When an exclusionPath is added to a text container, and the width of the path is as wide as the text container itself, text won't continue below the path, but gets clipped completely.

Steps to Reproduce:
  UIBezierPath *path = [UIBezierPath bezierPathWithRect:CGRectMake(0, 100, 768, 100)];
    self.textView.textContainer.exclusionPaths = @[path];

    CGSize size1 = [self.textView sizeThatFits:CGSizeMake(1024, CGFLOAT_MAX)];
    NSLog(@"Size that fits 1: %@", NSStringFromCGSize(size1));

    CGSize size2 = [self.textView sizeThatFits:CGSizeMake(768, CGFLOAT_MAX)];
    NSLog(@"Size that fits 2: %@", NSStringFromCGSize(size2));

    CGSize size3 = [self.textView sizeThatFits:CGSizeMake(800, CGFLOAT_MAX)];
    NSLog(@"Size that fits 3: %@", NSStringFromCGSize(size3));


//    2014-01-07 18:10:29.881 TextSizeTest[20699:60b] Size that fits 1: {1024, 1273.5}
//    2014-01-07 18:10:29.885 TextSizeTest[20699:60b] Size that fits 2: {760.5, 97.5} <<-- This can't be right
//    2014-01-07 18:10:29.894 TextSizeTest[20699:60b] Size that fits 3: {800, 1537.5}


Expected Results:
Text to continue below the path.

Actual Results:
No text appeared below the exclusion path.

Version:
iOS 7.0.4 (11B554a)

Notes:


Configuration:
iPad Air

Attachments:
'TextSizeTest.zip' was successfully uploaded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!