Below is my code of textView, but sizeToFit makes textView's height more than doubled of it's content text. Please provide any solution
UITextView *paragraphView = [[UITextView alloc] initWithFrame: CGRectMake(10, 10, 295, 30)];
[paragraphView setContentMode: UIViewContentModeScaleToFill];
[paragraphView setScrollEnabled: NO];
[paragraphView setEditable: NO];
[paragraphView setText: @"hello there ..........hii i am here....."];
[paragraphView setFont: [UIFont systemFontOfSize: 30]];
[self.view addSubview: paragraphView];
[paragraphView sizeToFit];
Try using NSLayout constraints to frame the UITextview instead of initwithframe. you may get the content sized height for textview properly