After upgrading to Xcode 11.2 from Xcode 11.1, app crashes due to _UITextLayoutView

Update: Fixed! 🎉🎊 The ONLY Solution is to update This bug is fixed in Xcode 11.2.1. So you can download and use it from here. Storyboards containing a UITextView will no longer cause the app to crash on operating system versions earlier than iOS 13.2, tvOS 13.2, or macOS 10.15.2. (56808566, 56873523) Xcode 11.2 is … Read more

UITextView that expands to text using auto layout

Summary: Disable scrolling of your text view, and don’t constraint its height. To do this programmatically, put the following code in viewDidLoad: let textView = UITextView(frame: .zero, textContainer: nil) textView.backgroundColor = .yellow // visual debugging textView.isScrollEnabled = false // causes expanding height view.addSubview(textView) // Auto Layout textView.translatesAutoresizingMaskIntoConstraints = false let safeArea = view.safeAreaLayoutGuide NSLayoutConstraint.activate([ textView.topAnchor.constraint(equalTo: … Read more

how to write in append mode for text file

Remove the following line of code [savedString writeToFile:documentTXTPath atomically:YES]; And remaining code are all fine. Anyway check my code also, NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *documentTXTPath = [documentsDirectory stringByAppendingPathComponent:@”Notes.txt”]; NSString *savedString = textview.text; NSFileHandle *myHandle = [NSFileHandle fileHandleForWritingAtPath:documentTXTPath]; [myHandle seekToEndOfFile]; [myHandle writeData:[savedString dataUsingEncoding:NSUTF8StringEncoding]];