0
글꼴이있는 사용자 지정 단추가 있습니다.UIButton 제목이 잘림
customButtonSynchronize = [UIButton buttonWithType:UIButtonTypeCustom];
customButtonSynchronize.frame=CGRectMake(578, 27.5, 91, 29) ;
[customButtonSynchronize setBackgroundImage:[UIImage imageNamed:@"synchronize.png"]
forState:UIControlStateNormal];
customButtonSynchronize.titleLabel.font = [UIFont fontWithName:@"HelveticaLTStd-Roman" size:14.0f];
[customButtonSynchronize setTitle:@"Sincronizzare" forState:UIControlStateNormal];
/////HERE//////////
customButtonSynchronize.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
customButtonSynchronize.contentVerticalAlignment = UIControlContentVerticalAlignmentTop;
customButtonSynchronize.contentEdgeInsets = UIEdgeInsetsMake(8, 0, 0, 0);
customButtonSynchronize.backgroundColor=[UIColor clearColor];
[customButtonSynchronize addTarget:self action:@selector(synchronizeDB:) forControlEvents:UIControlEventTouchUpInside];
위의 텍스트는 약간 "잘랐다"는 듯합니다. "S"의 상단을보십시오.
나는 버튼의 프레임하여이 삽입 DOESNOT 문제를 방지 font.Changing의 크기를 변경 싶지 않다. 그것은 시뮬레이터 버그 또는 helvetica 글꼴 문제가 있습니까? 어떤 일을해야합니까? 무기 호에
중복 가능성을 필요에 따라 올바르게 텍스트를 표시합니다 전화] (http://stackoverflow.com/questions/20978640/uibutton-does-not-resize-height-correctly-with-custom-font-when-sizetofit-is-cal) – rishi
당신도 이것을 볼 수 있습니다 [링크] (http://stackoverflow.com/questions/10200032/cropped-uibutton-title/10200908#10200908) – rishi