allowsNonContiguousLayout of NSLayoutManager associated with a UITextView cannot be set to false

Originator:jonas.salling
Number:rdar://45247730 Date Originated:October 13 2018
Status:Open Resolved:
Product:UIKit Product Version:iOS 12
Classification:Serious Bug Reproducible:Always
 
Area:
UIKit

Summary:
Our use case requires allowsNonContiguousLayout to be set to false, but this is no longer possible.

Steps to Reproduce:
Create a UITextView. Set allowsNonContiguousLayout of its layoutManager to false.

Expected Results:
If I set allowsNonContiguousLayout to false, the value should "stick".

Actual Results:
The value of allowsNonContiguousLayout does not "stick".

Version/Build:
iOS 12.0 through at least iOS 12.1 (16B5077c)

----

Sample project attached to original radar. Core part of sample project is this:

let v = UITextView(frame: .zero)
v.layoutManager.allowsNonContiguousLayout = false
view.addSubview(v)      
// allowsNonContiguousLayout = false is now "true"

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!