# Multiple Cinder UIView(s) iOS app

**URL:** <https://discourse.libcinder.org/t/multiple-cinder-uiview-s-ios-app/670>\
**Category:** Uncategorized\
**Created:** [April 26, 2017, 9:05am UTC](https://discourse.libcinder.org/t/multiple-cinder-uiview-s-ios-app/670 "2017-04-26T09:05:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hhit](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/hhit/32/303_2.png) [@hhit](https://discourse.libcinder.org/u/hhit)\
**Post date:** [April 26, 2017, 9:05am UTC](https://discourse.libcinder.org/t/multiple-cinder-uiview-s-ios-app/670/1 "2017-04-26T09:05:23Z")

</div>

Hello,

Is it possible to add multiple `CinderViewCocoaTouch`(s) to an iOS application. I’ve taken a look at the `NativeControls` sample and it has an example on how to add the “main” `ci::app::` window as a subview (`UIBarButtonItem` in that example). Is it possible to create new cinder `UIView`(s) and if so how would I go about doing that.

I’m basically trying to create a `UICollectionView` list of `cinder` windows/views that do their own separate “clipped” drawing.

Tried doing something like this:

```
CinderViewCocoaTouch* anotherView = [[CinderViewCocoaTouch alloc]
    initWithFrame: CGRectMake (0.0f, 0.0f, 100.0f, 100.0f)
    app: (AppCocoaTouch*) app::AppBase::get()
    renderer: app::AppBase::get()->getDefaultRenderer()
    sharedRenderer: nullptr
];

```

But that didn’t work. I might be missing more setup for the view to actually work, any help or hint on where to look would be much appreciated.

Thank You

---

<div class="post-metadata">

**Author:** ![rich.e](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/rich.e/32/1025_2.png) [@rich.e](https://discourse.libcinder.org/u/rich.e)\
**Post date:** [April 26, 2017, 1:54pm UTC](https://discourse.libcinder.org/t/multiple-cinder-uiview-s-ios-app/670/2 "2017-04-26T13:54:40Z")

</div>

Short story is: probably though, you’d have to dig into understanding all the communication that is necessary between `CinderViewCocoaTouch` and `ci::app` functionality. Nothing crazy there, but there is a lot of back and forth for events, etc.

Though do you really want, or need, to have multiple opengl views in your application? This is not usually the most efficient or convenient way to do things, as they each have their own context, are expensive to create and resize, and a number of other reasons.
