title: Need to show a turning cube on top of a view
body: <p>I have a view with an image that is semi transparent on top of my app, and I am going to need to display a 3D cube (or even a 3D look alike cube - made of 3 polygons) on that view.<br>
  Each face of the cube is touchable, and should identify once touched. ie, fire an event with it's ID or each fire it's own event, Which in turn will turn the cube...
  How can I accomplish that ? </p>
  
  <p>I'll try to visualize what I am after:</p>
  
  <p><strong>So, to go from this shown cube...</strong>
  <img src="https://i.stack.imgur.com/5jEpA.png" alt="enter image description here"></p>
  
  <p><strong>After touching the red face</strong>
  <img src="https://i.stack.imgur.com/C5Bmi.png" alt="enter image description here"></p>
  
  <p>This code simply shows a simple touchable button firing an event, which is all I have now</p>
  
  <pre><code>@implementation cubeView
  
  - (id)initWithFrame:(CGRect)frame
  {
      self = [super initWithFrame:frame];
      if (self) {
          // Initialization code
  
          [self setBackgroundColor:[UIColor clearColor]];
          UIImageView *view = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Label.png"]];
          // For RETINA DISPLAY create an image named Label@2x.png and make it twice big in x and in y
          [self addSubview:view];
          UILabel * lbl = [[UILabel alloc] initWithFrame:CGRectMake(20,20,100,30)];
          [lbl setText:@"Hello"];
          [lbl setBackgroundColor:[UIColor clearColor]];
          [self addSubview:lbl];
      }
      return self;
  }
  </code></pre>
  
  <p><strong>the view controller</strong></p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
  
      UIView *container = [[[UIView alloc] initWithFrame:CGRectMake(100, 0, 400, 200)]  
  autorelease];
      [self.view addSubview:container];
      container.alpha = 0.2;
      UIButton *b = [UIButton buttonWithType:UIButtonTypeCustom];
      b.frame = CGRectMake(0, 0, 201, 98);
      cubeView *cb = [[[SS alloc] initWithFrame:CGRectMake(0, 0, 201, 98)] autorelease];
      [b setImage:[self imageWithView:cb] forState:UIControlStateNormal];
      [container addSubview:b];
      [b addTarget:self action:@selector(clicked:)forControlEvents:UIControlEventTouchUpInside];
  
  
  
  }
  </code></pre>