iphone - Not able to use componentsSeparatedByString on a string stored inNSMutableArray -


i'm parsing xml contains string needs displayed on screen. here code doing that.

[gtutorialtextlist addobject:[attributedict objectforkey:@"value"]]; 

here value attribute contains text in xml , gtutorialtextlist nsmutablearray.

what need need break line when ever \n comes in string. here code performs that.

[[gtutorialtextlist objectatindex:0] componentsseparatedbystring:@"\n"]; 

but right i'm not able that. i'm not getting array of strings separated \n. when put nsstring directly, working fine.

please help. think conveyed doubt properly.

thanks in advance.

can log value of object @ index 0 like:

nsstring *logstring   = [gtutorialtextlist objectatindex:0] nslog(@"-->%@<--", logstring); nsarray *stringarray = [logstring componentsseparatedbystring:@"\n"]; nslog(@"%@", stringarray); 

this should give clear picture of going on.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -