like the Q
i have this code
K1player1D.text = [[NSUserDefaults standardUserDefaults] objectForKey:@"K1scoredLabel1"];
K1player1L.text = [[NSUserDefaults standardUserDefaults] objectForKey:@"K1scorelLabel1"];
K1player1K.text = [[NSUserDefaults standardUserDefaults] objectForKey:@"K1scorekLabel1"];
K1player1Q.text = [[NSUserDefaults standardUserDefaults] objectForKey:@"K1scoreqLabel1"];
K1player1T.text = [[NSUserDefaults standardUserDefaults] objectForKey:@"K1scoretLabel1"];
in viewDidLoad, for four players, so its 16 labels. is there any shorter way/code to do it ?
You could use
NSMutableArrayfill all theUILabelinside it and in a loop: