xcode - iOS: UITextView set height equal to content height -
I have a UITextview with disabled scrolling and I want to set the height of the UIFTviewview to match the content of the content the wanted. I have tried several ways in which no result is found. This is my code for the layout of UITextView:
- (zero) viewDidleWatchSubview view {// the name of the UITIKE is Job Dexcryation Job Viewer. CrawlAnited = No; [Job descript size tofitt]; [Job Descript LayoutEiff Undeaded]; }
I have also removed this code in viewDidAppear: method. Can anyone post code for this problem using iOS 7.0 and later solutions using automatic layout?
Did you try it? I added a button, with the code flowing in its methodology, I can see that the height has been changed to text height.
CGSize size = [self.textView systemLayoutSizeFittingSize: self.textView.contentSize]; Cgtff frame = self .text. Scene.fr; Frame.ize.height = size.height; Self.textView.frame = frames; Edit I added a lower position to the supervised obstacle and set it as the property of IBotlate, then in the scene DDAPier changed the barrier . - (zero) viewDeadPass: (BOOL) animated {[Super Viewed Up: Animated]; Self.textView.contentInset = UIEdgeInsetsZero; CGSize size = [self.textView systemLayoutSizeFittingSize: self.textView.contentSize]; Self. Heat control. Constant - Size = Hight - Self.texview.frame.height.height; Self.textView.scrollEnabled = NO; [Self. TextView Set Set Updent Consultants]; }
Comments
Post a Comment