Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


Graphics libraries - coming from JS land

Hi everyone,

I think I've gotten a decent handle on Swift, although the "Apple way" of doing things still kinda drives me nuts but I don't think that's ever going away.

Anyway, my goal is to build a visual inventory system. I have a top-down map of a building with different rooms. You click on a room and a modal appears and you enter data into the modal, it saves and you go about your business, free to check on them whenever.

In Javascript this wasn't too bad. There are plenty of graphics libraries and stuff to accomplish this but it seems like too much work in iOS. Not that I'm not willing to do it, but I feel like I'm missing something that'd make it easier. SpriteKit may do the trick but that seems primarily game driven, and that's not what I'm looking for. Thoughts? Ideas?

1 Answer

Michael Hulet
Michael Hulet
47,842 Points

If you're just looking for a modal view controller, then UIKit has a function for that. You'd call it like this:

let modalViewController = YourUIViewControllerSubclassForEditing()
presentViewController(modalViewController, animated: true, completion: nil)