IPB

Welcome Guest ( Log In | Register )


Quick Register
Welcome Guest, Register to Remove this Message!
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:
  • Be able to contribute to discussion.
  • Be able post screenshots and pictures in the gallery (coming soon).
  • Be able to share ideas with developers.
  • Be part of the ever growing iPhone SDK website dedicated to creating greats apps for the iPhone and iPod Touch.
  • Be able to get and give help to the people that want to develop apps.
  • Be able to discuss The-iBlog and The iDoctor news articles!
Login User Name

Login Password



Forgot Password

 
Reply to this topicStart new topic
> Change color in a selected row in UIPickerView
TrueScot
post 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];    } dry.gif
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 7th September 2010 - 11:34 PM
Your Ad Here