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 trialStuart Robertson
Courses Plus Student 1,296 PointsHelp...Intermediate Swift Couse Code Challenge 1
I have No idea what to do, but his demonstration didn't really show/tell me how to use this with 1 struct, watched it again a few times, but still don't get it
Another shot at it
struct LevelTracker {
let maxLevel: LevelTracker
}
struct LevelTracker {
let maxLevel: Int
}
LevelTracker.init(maxLevel: 4)
1 Answer
jcorum
71,830 PointsA type property in Swift uses the keyword static:
struct LevelTracker {
static let maxLevel = 232
}
Stuart Robertson
Courses Plus Student 1,296 PointsStuart Robertson
Courses Plus Student 1,296 PointsOh, i kept making it a custom type. Thanks for the help
Stuart Robertson
Courses Plus Student 1,296 PointsStuart Robertson
Courses Plus Student 1,296 PointsOh, i kept making it a custom type. Thanks for the help