ios - How can I pick a one array out of 400? -
i have file 420 nsarrays of words. each array has between 10 , 200 nsstrings. file size 988 kb.
it builds , runs fine when compiler no optimization. when try make archive hangs @ "analyzing 86 of 86 files." suspect it's because compiler gets stuck on optimizing file. split file 2 parts , archive after hour of compiling.
i put arrays dictionary , return 1 array want. think that's what's hanging compiler.
-- 420 nsarrays ... nsarray *foils_easy = [nsarray arraywithobjects:a_easy, about_easy, ... you_easy, your_easy, nil]; nsarray *keys = @[@"a", @"about", ... @"you", @"your"]; nsdictionary *allfoils = [nsdictionary dictionarywithobjects:foils_easy forkeys:keys]; return [allfoils objectforkey:target];
i don't need dictionary, except determine array return. there way construct array name can returned? maybe can use in putting image on screen?
nsstring *foregroundimagename = [nsstring stringwithformat:@"%@foregroundl1", scene];
i didn't want put in 420 'if' statements i'm hoping there's better solution.
you should try putting word arrays plist file , loading @ runtime, rather including of these string literals. keep code cleaner, , resolve issue.
Comments
Post a Comment