UITextView font to always be fixed size
I have a UICollectionView with cells sized to the same aspect ratio as a4 page. And with different screen sizes I would like for that text to be sized at fixed 12pt (that would be calculated to that UICollectionview cell), which would look bigger on the iPad and smaller on iPhone. So having a fixed font size isn't an option... Coding var fontSize : CGFloat = 12.0 // DEFAULT SIZE In your ViewDidLoad if UIDevice().userInterfaceIdiom == .phone { switch self.view.frame.size.height { case 480: fontSize = 12.0 case 568: fontSize = 14.0 case 667: fontSize = 16.0 case 736: fontSize = 17.0 case 812: