ios - Format String to NSString in swift -


i'm trying set tableviewcell properties different labels. keep getting errors regarding strings. i've started hooking array this.

 cell.titleviewlabel.text = arraynews[indexpath.row].title 

however keep getting error

cannot assign value of type nsstring value of type string 

how can format above title nsstring don't error in cellforrowatindexpath? or due else?

problem:

the root of problem follows:

cell.titleviewlabel.text nsstring

arraynews[indexpath.row].title string

solution:

you need cast string nsstring. try following syntax

cell.titleviewlabel.text = arraynews[indexpath.row].title nsstring 

Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -