Отрегулируйте размер шрифта UIButton по ширине
У меня такой код: UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; button.frame = CGRectMake(0.0, 0.0, 25, 25); [[button layer] setCornerRadius:5.0f]; [[button layer] setMasksToBounds:YES]; [[button layer] setBackgroundColor:[[UIColor redColor] CGColor]]; [button.titleLabel setFrame:CGRectMake(0,0, 25, 25)]; [button setTitle:[NSString stringWithFormat:@"%@", [[topics objectAtIndex:indexPath.row] unread]] forState:UIControlStateNormal]; Проблема в том, что если строка в тексте не длинная, она отображается нормально …