j7nn7k
j7nn7k

Reputation: 18612

Integrate UIView and GLKView inside of UIViewController

I use Xcode 4.3.2 with iOS SDK 5.1.

I want to create a view controller in my storyboard, which contains a GLKView on the half screen and Buttons + Text on the other half.

I tried the put both in a UIViewController but could get it to work.

Any ideas? Articles? Tutorials?

Upvotes: 2

Views: 2950

Answers (2)

Sabareesh Kkanan
Sabareesh Kkanan

Reputation: 1211

Create a instance of GLKViewController in UIViewController and now add the GLKViewController as a child view controller and also add GLKView as a subview to the UIViewController

Upvotes: 8

sergio
sergio

Reputation: 69047

The approach I would follow is:

  1. create your GLKView/GLKViewController as usual;

  2. add you UIView containing buttons and text as a subview to the GLKView.

I would do the second step programmatically, in GLKViewController's viewDidLoad method.

Upvotes: 0

Related Questions