Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- viewWillAppear
- viewWillDisappear
- viewDidAppear
- viewDidDisappear
- viewDidLoad
- viewDidUnload
- viewWillUnload
- – viewDidUnload Deprecated in iOS 6.0
- – viewWillUnload Deprecated in iOS 6.0
- Configuring a GLKit view
- - (void)viewDidLoad
- {
- [super viewDidLoad];
- // Create an OpenGL ES context and assign it to the view loaded from storyboard
- GLKView *view = (GLKView *)self.view;
- view.context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
- // Configure renderbuffers created by the view
- view.drawableColorFormat = GLKViewDrawableColorFormatRGBA8888;
- view.drawableDepthFormat = GLKViewDrawableDepthFormat24;
- view.drawableStencilFormat = GLKViewDrawableStencilFormat8;
- // Enable multisampling
- view.drawableMultisample = GLKViewDrawableMultisample4X;
- }
- Simple Core Animations 3D transform of UIView
- CATransform3D rotationAndPerspectiveTransform = CATransform3DIdentity;
- rotationAndPerspectiveTransform.m34 = 1.0 / -1000.0;
- rotationAndPerspectiveTransform = CATransform3DRotate(rotationAndPerspectiveTransform, M_PI * 0.6, 1.0f, 0.0f, 0.0f);
- [UIView animateWithDuration:1.0 animations:^{
- self.someView.layer.anchorPoint = CGPointMake(0.5, 0);
- self.someView.layer.transform = rotationAndPerspectiveTransform;
- } completion:^(BOOL finished){
- // code to be executed when flip is completed
- }];
Advertisement
Add Comment
Please, Sign In to add comment