【发布时间】:2015-09-26 22:29:57
【问题描述】:
我偶然发现了一个 UISegmentedControl,我想调整字体大小,浏览了几个教程但仍然无法修复它,因为所有示例看起来都与我所拥有的不同,并且 InterfaceBuilder 中没有字体选项,所以如何以及实际上我在哪里添加字体标准?谢谢你的帮助。这就是我所拥有的:
- (void)valueChanged:(UISegmentedControl *)segment
{
if(segment.selectedSegmentIndex == 0) {
[self getlistInformationbyIdPerson:self.person.id_person withInformationType:1 withCompletion:^{
[self.personConnectedInformationTableView reloadData];
}];
}
else if(segment.selectedSegmentIndex == 1){
[self getlistInformationbyIdPerson:self.person.id_person withInformationType:3 withCompletion:^{
[self.personConnectedInformationTableView reloadData];
}];
}
else if(segment.selectedSegmentIndex == 2){
[self getlistInformationyIdPerson:self.person.id_person withInformationType:2 withCompletion:^{
[self.personConnectedInformationTableView reloadData];
}];
}
}
我有这个:
- (NSString *)noSegmentedControlDataLabelForSegment:(NSInteger)aSegment andCelebrity:(NSString *)aCelebrity
{
NSString *noDataMessage;
NSString *segmentText
switch (aSegment) {
case 0:
segmentText = @"list1";
break;
case 1:
segmentText = @"list2";
break;
case 2:
segmentText = @"list3";
break;
default:
break;
}
noDataMessage = [NSString stringWithFormat:@"We are sorry to inform you that our dataBase dosen't contain any information"];
return noDataMessage;
}
和.h中的这个
@property(nonatomic,retain) IBOutlet UISegmentedControl *segment;
【问题讨论】: