Ruby Motion just came out, and the screencast doesn’t seem to say anything about whether or not you can use Interface Builder to build your interfaces and integrate them in your RubyMotion project. Is such a thing possible? Or do I really have code everything by hand, not to mention maintain to different pieces of code for iPhone/iPad?
My rep isn’t high enough to create a rubymotion tag, so please help out if appropriate.
I’d just like to point out that RubyMotion 1.3 now support automatic compilation of
.xibfiles that you put into theresourcesfolder. So now the workflow becomes :.xibfile using XCode (no need to create a project, just use File|New…|File) and save it into theresourcesfolder. As there is no support for outlets yet, be careful to set thetagproperty for each control you want to use in your code (you’ll find in the property sheet of each component under the “View” header)..xibfile into a.nibfile, so enjoy 🙂UIViewControllerderived class, load the nib usingloadNibNamed:owner:options:, as shown below.viewDidLoad, fetch your various components usingviewWithTag:and add events handlers usingaddTarget:action:forControlEvents:,as show below.As a bonus, next time you want to edit your xib, just do
open resources/MyView.xib, it will only launch the good parts of XCode.