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 Displaying Data with Table Views in Swift 2 Enhancing the Networking Stack Finishing Up the Networking Stack

Ritesh R
PLUS
Ritesh R
Courses Plus Student 17,865 Points

Default value does work for category

Pasan Premaratne The default value for category parameter does work in the fetchRestaurantsFor method.. In the video @ 11:21 the error is for the additional bracket next to nil..

func fetchRestaurantsFor(
        location: Coordinate,
        category: Foursquare.VenuesEndpoint.Category = Foursquare.VenuesEndpoint.Category.Food(nil),
        query: String? = nil,
        searchRadius: Int? = nil,
        limit: Int? = nil,
        completion: APIResult<[Venue]> -> Void) 
Pasan Premaratne
Pasan Premaratne
Treehouse Teacher

Yeah I realized that when I was reviewing the videos, but it would've delayed the course to reshoot. Thanks for the heads up! :)