Note that there are some explanatory texts on larger screens.

plurals
  1. POhow get values from subview(UILabel) of ScrollView in iphone
    text
    copied!<p>i added 10 labels(labels contains some data) to scrollview .i want to get the value of label at particular location .can u please get me know how to get the value at that location.please give suggestion for this is the code what i have written .how can i get the value of the user selected language</p> <pre><code>-(void)printLanguage { NSLog(@"in print language method"); //int y=0; //NSMutableArray *languageArray=[[NSMutableArray alloc]initWithObjects:@"Chinese",@"Spanish",@"English",@"Arabic",@"Hindi",@"Bengali",@"Portuguese",@"Russian",@"Japanese",@"German",nil]; //UILabel *languageLabel=[[UILabel alloc]initWithFrame:CGRectMake(0, y ,90,30 )]; languagValue=0; int y=0; NSMutableArray *languageArray=[[NSMutableArray alloc]initWithObjects:@"Chinese",@"Spanish",@"English",@"Arabic",@"Hindi",@"Bengali",@"Portuguese",@"Russian",@"Japanese",@"German",nil]; for(languagValue=0;languagValue&lt;[languageArray count];languagValue++) { UILabel *languageLabel=[[UILabel alloc]initWithFrame:CGRectMake(0, y ,90,30 )]; NSLog(@"array count is @%d",[languageArray count]); languageLabel.text=[languageArray objectAtIndex:languagValue]; NSLog(@"array objectat index is @%@",[languageArray objectAtIndex:languagValue]); languageLabel.font=[UIFont systemFontOfSize:19.0]; languageLabel.backgroundColor=[UIColor clearColor]; [languageScrollView addSubview:languageLabel]; // [languageScrollView addSubview:languageLabel]; //y+=90; y+=languageLabel.frame.size.height; [languageLabel release]; } [languageScrollView setShowsHorizontalScrollIndicator:NO]; [languageScrollView setShowsVerticalScrollIndicator:NO]; [languageScrollView setContentSize:CGSizeMake(genderScrollView.frame.size.width, y)]; } </code></pre> <p>Thank You,</p> <p>girish</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload