iphone - How to add label to scrollview -


I am doing a little bit on the concept about how to add labels to ScrollView. I have written a code

but my app is ending. But I can not understand why this is ending. Anyone can help in solving this problem .... my application is finished at the third place after the label ..

  int y = 0; @ "English", @ "Arabic", @ "Hindi", @ "Bengali", @ "Portuguese", @ "Russian", "NSW" @ "Japanese", @ "German", zero]; UILabel * languageLabel = [[UILabel alloc] initWithFrame: CGRectMake (0, Y, 90, 30)]; For (Int i = 0; I & lt; [Language total count]; i ++) {NSLog (@ "ARAC number is @% d", [language calculation]); LanguageLabel.text = [LanguageRayoutEndIndex: i]; NSLog (@ "Array Object Index @% @", [Language: ObjectEndex: I]); LanguageLabel.font = [UIFont systemFontOfSize: 19.0]; LanguageLabel.backgroundColor = [UIColor clear collar]; [LanguageScrollLear add addSubview: LanguageLabel]; // [Add LanguageSlowAubview: LanguageLabel]; // y + = 90; Y + = languageLabel.frame.size.height; [Language label release]; } [LanguageScrollViewSearchHorizontrollScroll Indicator: No]; [LanguageScrollViewSetoshVerticalScroll Indicator: No]; [LanguageScroll SetCentantsSize: CGSizeMake (genderScrollView.frame.size.width, y)];    

Try with modified code below

  Int y = 0; @ "English", @ "Arabic", @ "Hindi", @ "Bengali", @ "Portuguese", @ "Russian", "NSW" @ "Japanese", @ "German", zero]; For (Int i = 0; I & lt; [Language calculation]; I ++) {UILabel * languageLabel = [[UILBL Allocence] Initwithframe: CGRactam (0, Y, 90, 30)]; NSLog (@ "ARAC number is @% d", [languagea calculation]); LanguageLabel.text = [LanguageRayoutEndIndex: i]; NSLog (@ "Array Object Index @% @", [Language: ObjectEndex: I]); LanguageLabel.font = [UIFont systemFontOfSize: 19.0]; LanguageLabel.backgroundColor = [UIColor clear collar]; [LanguageScrollLear add addSubview: LanguageLabel]; // [Add LanguageSlowAubview: LanguageLabel]; // y + = 90; Y + = languageLabel.frame.size.height; [Language label release]; }    

Comments