我想要自动字体大小
大小UITextView
想要更改字体大小。
https://github.com/AndroidDeveloperLB/AutoFitTextView
if (self.ui_text.contentSize.height > self.ui_text.frame.size.height) {
int fontIncrement = 1;
while (self.ui_text.contentSize.height > self.ui_text.frame.size.height) {
self.ui_text.font = [UIFont fontWithName:@"Copperplate" size:self.ui_text.font.pointSize - fontIncrement];
fontIncrement++;
}
}else {
int fontIncrement = 1;
while (self.ui_text.contentSize.height >= self.ui_text.frame.size.height) {
self.ui_text.font = [UIFont fontWithName:@"Copperplate" size:8.0 + fontIncrement];
fontIncrement++;
}
}