Question

Can C4iOS be used in a view? I want to use C4 in a view and integrate it with other UIKIT components. all templates and examples are using an special window and app delegate, so the c4 sketch takes all of window. Is it possible to display the sketch in a UIView as a part of the application?

Was it helpful?

Solution

Yes, it can be.

In fact, all visible objects in C4 are actually views (subclasses of UIControl), so you can add them to other UIKit components using the [object addSubview:] method.

I haven't actually implemented using a C4Canvas in its own window or space, but since it is essentially a UIView and the C4WorkSpace is a UIViewController then it's certainly possible to do so.


I've built an iOS tabbed application that uses 2 C4WorkSpace objects as the primary view controllers.

https://github.com/C4Code/tabbed

This project shows that it's possible, there's a little bit of hacking to get it working. I don't have time to do a write up of the process I used to get it running right now, so I hope this is okay for the moment.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top