tags:

views:

5

answers:

0

hi i am new to iphone application development.what i am doing is displaying the 20 images using customimagepicker in separete imageview .now what i need is along with that image i have to display image label gor that i am writing the code as

NSMutableArray *labels=[NSMutableArray arrayWithObjects:@"Bear",@"Bufflo",@"Cat",@"Camel",@"Cow",@"dog", @"Deer",@"Elephant",@"FOx",@"Goat",@"Gorilla",@"Horse",@"Frog",@"Lion", @"Monkey",@"Rabbit",@"Rahino",@"Rat",@"Snake",@"Squrillel",@"Tiger",@"Zebra",nil];

NSLog(@"imageID %@",_imageView.selectedImage);  

UILabel *lable = [[UILabel alloc]initWithFrame:CGRectMake(0, 360.1, 320, 120)];
lable.font = [UIFont fontWithName:@"Arial" size:30];


lable.text = [labels objectAtIndex:_imagePicker.selectedImage];
lable.textAlignment = UITextAlignmentCenter;    

[self.view addSubview:lable];

in console it gets image id as like this but the image lable is not displaed how can i solve this pls help me i am teying this from one weak pls help me