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 trialRyan Maneo
4,342 PointsWhy is the @IBAction for showFunFact below the didRecieveMemoryWarning method?
Title says it all... why?!?! can't it be above it?
1 Answer
Vyacheslav Horbach
18,592 PointsThe location in code doesn't really matter as long as you're in the right scope. However in this case the location of @IBAction is a result of the general rules on how to write iOS apps :)
Safwat Shenouda
12,362 PointsSafwat Shenouda
12,362 PointsWell, location in code doesn't matter, it can be anywhere inside the class. off course it can be above!