rubymotion-community / ib

IB Outlets for rubymotion
MIT License
253 stars 33 forks source link

IBDesignable/Inspectable thoughts? #71

Closed malkomalko closed 9 years ago

malkomalko commented 10 years ago

I'm going to create a fork to try working this in. At a baseline level, is there a way with ib to add swift/obj-c files to the Supporting Files folder of the generated xcodeproj? This would be useful for exposing basic stuff like cornerRadius so you can see it updated in real time.

colinta commented 10 years ago

This sounds very cool; would the Supporting Files be generated based on code from the project, or would these be source files that you create?

malkomalko commented 10 years ago

So right now I'm just trying to get it to work manually. I can create a custom DesignableView with the cornerRadius set so I can live edit the cornerRadius and see it in Xcode. I manually add the files into the xcode project ib generates for now, and can set a view to that class, but it doesn't seem to work, as the designables just spins forever.

http://cl.ly/image/3u1X3P062S1C

So just trying to figure out if this is possible first. Then I think the easiest solution would be to update the ib gem to pass it a folder/list of files you want to include in the "Supporting Files" folder. Then as long as you also add that same folder of files via app.vendor_project, it should work.

colinta commented 10 years ago

Interesting... I haven't had success getting the "live-loading custom views" working yet in xcode, so I'm not gonna be a lot of help on this one, but I'm happy to take a look at your work, if you want another set of eyeballs.

malkomalko commented 10 years ago

I got ib inspectable views working!! Granted it's hard coded but project totally builds.

colinta commented 10 years ago

NICE! Time to deconstruct/reconstruct - always much easier! :smiley:

colinta commented 9 years ago

I don't know why we never closed this, since these actually work now (using objc code is a bummer, but better than nothing!)