ios - Not able resolve a NULL cString crash -



ios - Not able resolve a NULL cString crash -

hi have next code crashes app:

cell.textlabel.text = [nsstring stringwithcstring:[[[self.arrayfortablesellang objectatindex:indexpath.row] objectforkey:ksupport_question_title] cstringusingencoding:nsisolatin1stringencoding] encoding:nsutf8stringencoding];

the error is:

* terminating app due uncaught exception 'nsinvalidargumentexception', reason: '* +[nsstring stringwithcstring:encoding:]: null cstring

nslog gives me:

wie lange dauert es, bis meine guthaben-Ãœberweisung auf meiner karte gebucht ist?

how can solve issue?

thanks in advance.

i meant this:

nsdictionary *langdict = self.arrayfortablesellang[indexpath.row]; nsstring *string = langdict[ksupport_question_title]; char *cstring = [string cstringusingencoding:nsisolatin1stringencoding]; cell.textlabel.text = [nsstring stringwithcstring:cstring encoding:nsutf8stringencoding];

update

update code way:

nsdictionary *langdict = self.arrayfortablesellang[indexpath.row]; cell.textlabel.text = langdict[ksupport_question_title];

ios iphone objective-c

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -

Set Up Of Common Name Of SSL Certificate To Protect Plesk Panel -