Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

grandM

macrumors 68000
Original poster
Oct 14, 2013
1,568
329
Hi Guys

Does somebody know why I am getting this fault?

I'm doing this in my ViewController:
Code:
var a = WordClass()
var word = a.title

The class WordClass goes:
Code:
class WordClass{


    var title: String = "hey"

    init(){

        title = "hey again"

    }

Xcode gives me that the ViewController does not have a member called a. I'm puzzled. Thanks for your help.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.