Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Delegates in Swift 2 Introduction to Delegates Introduction to Design Patterns

Problems with the code in the Playground Modeling a Race Game

Hi, I am watching delegates in swift and there is the problem with the code at NSDate.new() class HorseRace: Race { let participants: [Horse] init(laps: Int, horses: [Horse]) { self.participants = horses super.init() self.laps = laps }

override func start() {
    print("Start the race")
    raceTracker.startTime = NSDate.new()
    for horse in participants {
        horse.giddyUp()

    }
}

Its showing new() is unavailable in Swift; use Object initialisers instead. Can anyone please explain this.

1 Answer