![]() |
Hello and welcome to iPhone SDK Discussion Forum, like most online communities you must register to post in our community, but don't worry this is a simple free process that requires minimal information. Take advantage of it immediately Register Now There are many great features that are not available to guests at iPhone SDK Discussion Forum including:
|
Forgot Password |
![]() ![]() |
Jul 10 2010, 01:53 PM
Post
#1
|
|
|
Newbie ![]() Group: Members Posts: 1 Joined: 10-July 10 Member No.: 1,010 |
I trying to change the color of a single row thats been selected in a UIPickerView with a Toolbar Button connected to an IBAction but it doesn't like the 'label' and 'component' in the call to UIView *pickerView viewForRow. It thinks its undeclared. Also, it paints every row and I only want a single row painted - (I've tried it as a separate method). Here is the code:
-(IBAction) setParm { UIView *pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)rowforComponent:(NSInteger)component reusingView:(UIView *)view UILabel *label = (UILabel *) view; if (label == nil) { label = [[UILabel alloc] init];} [label setText:@"parameter set"]; [label setTextColor:[UIColor blackColor]]; [label setBackgroundColor: [UIColor colorWith [indent]Red:(CGFloat)0.376 green:(CGFloat)0.988 blue:(CGFloat)0.36 alpha:(CGFloat)0.50]; CGSize rowSize = [pickerView rowSizeForComponent:component]; CGRect labelrect = CGRectMake(0, 0, rowSize.width, rowSize.height); [label setFrame:labelrect]; } |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 7th September 2010 - 11:34 PM |