Change Font style in uipickerview title text. i want to change only selected title row font style is bold and other title text is normal font.change title font style i want to font style is Helvetica Neue Bold.
Asked
Active
Viewed 871 times
0
-
Thank you sir,but in this link all pickerview text is bold i want to only selected title text font change – Maulik Salvi Oct 20 '15 at 09:04
-
check with this http://stackoverflow.com/a/19825249/5362916 – Uma Madhavi Oct 20 '15 at 09:07
-
Font style will be change NSAttributedString – Maulik Salvi Oct 20 '15 at 09:15
1 Answers
0
- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view
{
if(row == yourSelectedIndex)//to set as bold
{
UILabel* tView = (UILabel*)view;
if (!tView)
{
tView = [[UILabel alloc] init];
[tView setFont:[UIFont boldFontWithSize:14"]];
}
tView.text=@"your text values";
return tView;
}
}

Rohan
- 2,939
- 5
- 36
- 65