¡@

Home 

2014/10/15 ¤U¤È 10:12:22

iphone Programming Glossary: openglview

More iCloud Core Data synching woes

http://stackoverflow.com/questions/14478517/more-icloud-core-data-synching-woes

UIScrollView and Cocos2D

http://stackoverflow.com/questions/2457380/uiscrollview-and-cocos2d

in my layer CocosOverlayViewController scrollView CocosOverlayViewController alloc Director sharedDirector openGLView addSubview scrollView.view I am creating the layer in my scene Scene scene Scene node GridLayer layer GridLayer node scene.. the OpenGLView by calling the following line inside the UIScrollView's touchesBegan method CCDirector sharedDirector openGLView touchesBegan touches withEvent event Note that calling this previous line is enough for propagating nonscrolling and nonzooming.. . CGPoint point touch locationInView touch view CGPoint point touch locationInView CCDirector sharedDirector openGLView point CCDirector sharedDirector convertToGL point return self convertToNodeSpace point CGPoint convertTouchToNodeSpaceAR..

cocos2d: playing a video in the background of a menu

http://stackoverflow.com/questions/4454758/cocos2d-playing-a-video-in-the-background-of-a-menu

movie I instantiate a MPMoviePlayerController and then I add its view to the glView this way CCDirector sharedDirector openGLView addSubview moviePlayer.view I have seen this question was quite similar How to have a menu when a movie is playing iphone.. logo UIImageView alloc initWithImage UIImage imageNamed @ logo.png UIView theView CCDirector sharedDirector openGLView logo setCenter ccp 240 80 moviePlayer.view addSubview logo self unscheduleAllSelectors but the movie still remains on top.. logo UIImageView alloc initWithImage UIImage imageNamed @ stupidLogo.png UIView theView CCDirector sharedDirector openGLView logo setCenter ccp 240 80 logo.transform CGAffineTransformMakeRotation 3.14 2 moviePlayer.view addSubview logo self unscheduleAllSelectors..

cocos2d-iOS - Gesture recognisers

http://stackoverflow.com/questions/4985917/cocos2d-ios-gesture-recognisers

up the chain . Don't attach them to the individual nodes attach them to the UIView i.e. CCDirector sharedDirector openGLView . Here's what I did UIPanGestureRecognizer watchForPan SEL selector number int tapsRequired UIPanGestureRecognizer recognizer.. self action selector autorelease recognizer.minimumNumberOfTouches tapsRequired CCDirector sharedDirector openGLView addGestureRecognizer recognizer return recognizer void unwatch UIGestureRecognizer gr CCDirector sharedDirector openGLView.. addGestureRecognizer recognizer return recognizer void unwatch UIGestureRecognizer gr CCDirector sharedDirector openGLView removeGestureRecognizer gr This particular code is used in a superclass for scene controllers so the target for the selector..

how we can show UIViewController and UIView by using cocos2d?

http://stackoverflow.com/questions/506680/how-we-can-show-uiviewcontroller-and-uiview-by-using-cocos2d

it like Director sharedDirector window addSubview myView Updated to cocos 0.7 and now this is Director sharedDirector openGLView addSubview myView And in Cocos 0.99 CCDirector sharedDirector openGLView addSubview myView And in Cocos 2.0 CCDirector sharedDirector..

Create layer mask with custom-shaped hole

http://stackoverflow.com/questions/5721196/create-layer-mask-with-custom-shaped-hole

spr boundingBox colorLayer.position maskLayer.position colorLayer setMask maskLayer CCDirector sharedDirector openGLView layer addSublayer colorLayer Multiple Layer Mask Example CGSize winSize CCDirector sharedDirector winSize UIImage img UIImage.. spr boundingBox colorLayer.position outerLayer.position colorLayer setMask outerLayer CCDirector sharedDirector openGLView layer addSublayer colorLayer Image Mask Example CGSize winSize CCDirector sharedDirector winSize UIImage img UIImage imageNamed.. spr boundingBox colorLayer.position maskLayer.position colorLayer setMask maskLayer CCDirector sharedDirector openGLView layer addSublayer colorLayer CGImageRelease ref iphone ios cocos2d iphone share improve this question I came back to..

Problem playing mov file in MPMoviePlayerController

http://stackoverflow.com/questions/7493860/problem-playing-mov-file-in-mpmovieplayercontroller

mpc setMovieSourceType MPMovieSourceTypeFile mpc setRepeatMode MPMovieRepeatModeNone CCDirector sharedDirector openGLView addSubview mpc.view mpc play But if I try and change it to a .mov file nothing happens There is no error so its picking..