0

I have an application in which a pickerview is ther with images.I had done that with this.`

picker1=[[UIPickerView alloc] init];
        picker1.frame= CGRectMake(30,90,155,316);




        picker1.delegate = self;
        picker1.dataSource = self;
        picker1.showsSelectionIndicator = YES;

        picker1.tag = 1;
        [self.view addsubview:picker1];

and i am using viewForRow delegate methode to load the images.i need to increase the images frame there inside the pickerview.`

UIImage *img = [UIImage imageNamed:[NSString stringWithFormat:@"%@.png",[self.array objectAtIndex:row]]];

    UIImageView *icon = [[UIImageView alloc] initWithImage:img];        
    //temp.frame = CGRectMake(170, 0, 30, 30);




    UIView *tmpView = [[[UIView alloc] initWithFrame:CGRectMake(155,75,95,35)] autorelease];
    [tmpView insertSubview:icon atIndex:0];
    picker1.backgroundColor = [UIColor clearColor];
    [(UIView*)[[picker1 subviews] objectAtIndex:2] setAlpha:0.0f];
    [(UIView*)[[picker1 subviews] objectAtIndex:0] setAlpha:0.0f];
    [(UIView*)[[picker1 subviews] objectAtIndex:1] setAlpha:0.0f];
    [(UIView*)[[picker1 subviews] objectAtIndex:3] setAlpha:0.0f];

    [tmpView setUserInteractionEnabled:NO];

    [tmpView setBackgroundColor:[UIColor clearColor]];
    [tmpView setTag:row];

    return tmpView;

but when i try to increase the frame of the view its position only changing,not the size.can anybody help me to achieve this?

Maulik
  • 19,348
  • 14
  • 82
  • 137
hacker
  • 8,919
  • 12
  • 62
  • 108

1 Answers1

-2

implement the following pickerview delegate method..

- (CGSize)rowSizeForComponent:(NSInteger)component{

    CGSize size = CGSizeMake(320, 60); //input ur custom size

   return size;

}
AppleDelegate
  • 4,269
  • 1
  • 20
  • 27