Created
July 4, 2013 06:30
-
-
Save Marlunes/5925345 to your computer and use it in GitHub Desktop.
CUSTOMIZE PICKERVIEW TEXT/CONTENT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Implement pickerview delegate | |
// Add some stuffs inside | |
- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view{ | |
UILabel *pickerLabel = (UILabel *)view; | |
CGRect frame = CGRectMake(0,0,250,40); | |
pickerLabel = [[UILabel alloc] initWithFrame:frame]; | |
[pickerLabel setTextAlignment:UITextAlignmentCenter]; | |
[pickerLabel setBackgroundColor:[UIColor clearColor]]; | |
[pickerLabel setFont:[UIFont boldSystemFontOfSize:14.0]]; | |
[pickerLabel setNumberOfLines:0]; | |
[pickerLabel setText:[self.content objectAtIndex:row]]; | |
return pickerLabel; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment