BEScreen

type:
extension
author:
Brian Ensor
description:
An easy way to handle orientation
lastupdate:
2011-04-11
compatible:
v1.2
tag:
orientation, rotation, rotate, landscape, portrait
homepage:
https://github.com/brianensorapps/BEScreen
download:
https://github.com/brianensorapps/BEScreen/zipball/master

Usage

BEScreen makes it easy to set and rotate between orientations automatically. It supports all iOS devices and also sends events upon rotation.

Adding to your stage:

mScreen = [BEScreen screenWithOrientation:BEScreenOrientationPortrait rotates:YES allowAllOrientations:YES];
[self addChild:mScreen];
[mScreen addEventListener:@selector(orientationChanged:) atObject:self forType:BE_SCREEN_EVENT_ORIENTATIONCHANGED];

Adding SPDisplayObjects to BEScreen:

SPQuad *quad = [SPQuad quadWithWidth:100 height:100 color:0xff0000];
quad.x = 50;
quad.y = 50;
[mScreen addChild:quad];

Changelog

  • 2011/02/14 02:58: First public version

Source Code

Discussion

No comments so far. Feel free to edit this part of the page.

  extensions/be_screen.txt · Last modified: 2015/09/14 11:15 by 127.0.0.1
 
Powered by DokuWiki