objective c - I am trying to create an NSArray for my labels -


i trying create nsarray labels not sure how beginner in objective c. i'm reading text file , each question in there has 4 different answers options, how can create array loop through answers , display them labels?

this how set txt file: output while loop generate?

x = 6; while (x > 0) {   system.out.println(x + ", ");   x--; } # a. no output generated. # b. 6, 5, 4, 3, 2, 1, # c. 5 , 4, 3 ,2, 1. # d. output infinite. # b. 6, 5, 4, 3, 2, 1, @ 

the # sign separate answers , last option correct answer. @ sign line break.

any appreciated.

one quick way using

nsarray *array = [string componentsseparatedbystring:@"#"]; 

ignore first object since contain, question, , trim whitespaces , @ in last object. assuming there no # in string except separate answers


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -