{"id":3299,"date":"2014-03-21T20:23:49","date_gmt":"2014-03-21T20:23:49","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/21\/ios6cocos2d-iphonesprite-sheetrelated-issues-collection-of-common-programming-errors\/"},"modified":"2014-03-21T20:23:49","modified_gmt":"2014-03-21T20:23:49","slug":"ios6cocos2d-iphonesprite-sheetrelated-issues-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/21\/ios6cocos2d-iphonesprite-sheetrelated-issues-collection-of-common-programming-errors\/","title":{"rendered":"ios6,cocos2d-iphone,sprite-sheetRelated issues-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/f86c32f7dc700dd959bdce4da8cca45c?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nTullio Onion Sebastiani<br \/>\niphone objective-c ios6 storyboard navigationcontroller<br \/>\nI&#8217;m developing an iOS6 App with storyboards and i&#8217;m encountering an unexpected beahviour. My app is almost in portrait mode , and i would keep this orientation in all the views except two.For this reason the project supports both landscape and portrait mode, i&#8217;ve subclassed navigation controller with a category (as explained almost everywhere :-)in Appdelegate.m and every view controller implements &#8211; (NSUInteger)supportedInterfaceOrientations{return UIInterfaceOrientationMaskPortrait; (landscap<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/b6f6460f1edf64181bf598771ef5f330?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nLukas Kukacka<br \/>\nios6 storyboard autolayout<br \/>\nI am struggling with Autolayout (using it for the first time in a new app).Following situation:Storyboard iPad Autolayout enabledIn one Popover I need to re-layout 8 buttons programmatically according to user-selection. This works fine until the moment where the buttons must be rotated by 180\u00b0 (to be viewed upside down, which is an app feature).As soon as I add the code for the rotation, the relayout does not work anymore. I don&#8217;t understand why I can change the position of the buttons (like Cas<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/NZT8G.png?s=32&amp;g=1\" \/><br \/>\nAitul<br \/>\nios6 game-center invitation<br \/>\nI am developing a turn based game using the Game Center. I handle the invitations to play using the following code::GKMatchmaker sharedMatchmaker].inviteHandler = ^(GKInvite* acceptedInvite, NSArray *playersToInvite){if(acceptedInvite != nil){\/\/ Get a match for the invite we obtained&#8230;NSLog(@&#8221;Valor de la invitacion %@&#8221;,acceptedInvite);[[GKMatchmaker sharedMatchmaker] matchForInvite:acceptedInvite completionHandler:^(GKMatch *match, NSError *error){if(match != nil){NSLog(@&#8221;match != nil: &#8220;);}else<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/dcbd727a1d3fe8eebba8b53e4d9ea4cf?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\npoupou<br \/>\nxcode mono monotouch monodevelop ios6<br \/>\nI have a problem building my app on MonoTouch and iOS 6.My system configuration is:Mac OSX 10.7.4 (Lion) MonoTouch 5.2.13 MonoDevelop 3.0.3.5 XCode 4.5 with iOS 6 SDK beta 4.To link new iOS SDK I have selected on MonoDevelop preference SDK location (for me it&#8217;s on desktop) and i have restarted it.Now, when I try to build my application, MonoDevelop gives me following error:Unexpected error &#8211; Please fill a bug report athttp:\/\/bugzilla.xamarin.com (MT0000) Can anyone help me to understand what is<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/8e703612ee9342cb3980a4661b7bd599?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nBacalso Vincent<br \/>\nios svn ios6 cocoapods xcode4.6.2<br \/>\nSo we decided to integrate cocoapods in our existing project which is under SVN. My teammate had successfully setup it and he can just build the project just fine.But when I checked-out the project and did a pod install, this what happens:Analyzing dependencies Downloading dependencies Using ASIHTTPRequest (1.8.1) Using Base64nl (1.1) Installing Facebook-iOS-SDK (3.7.1) [!] Pod::Executable clone &#8216;\/Users\/me\/Library\/Caches\/CocoaPods\/GitHub\/2cdc3c53ee617444d0d6cd7730e598cd77a19eb2&#8217; &#8216;\/Users\/me\/Desk<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/0748919a08032785e3190e4f9d37cd42?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSpaceBeers<br \/>\niphone mapkit ios6 ios6-maps<br \/>\nMy understanding was there was no problems moving to iOS 6 maps. But for some reason, the Detail Disclosure Button is now MISSING in my map App. Is there a way to get this back. Wow, totally unexpected. This has been working for years, so all delegates are fine.#pragma mark MKMapViewDelegate &#8211; (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id &lt;MKAnnotation&gt;)annotation {MKPinAnnotationView *pin = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifi<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1f9f4ac8d09e3c0aed2a7ae65ebbee5f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nNSUserDefault<br \/>\niphone uinavigationcontroller ios6 uiinterfaceorientation<br \/>\nI created an app in ios 6 with navigation view.Also I have set all orientation options in the application summary and even used the-(BOOL) shouldAutoRotateand -(NSUInteger) supportedInterfaceOrientaionmethods in my view controller.when I run my app orientation works fine except upside-down.What should I do to also support upside-down.I also facing the same problem when I add UITabBar controller.Please share your ideas.Thank you<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e2fd8602397f2e842f5bd64b2a3269a5?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nmattkc7<br \/>\nios xcode ios6 ios-simulator xcode4.5<br \/>\nI&#8217;m making an iPad app and it runs on the simulator, but fails when i try building it for the device. the error is below:These are the things i&#8217;ve tried to rectify this issue:went through every PNG file with Photoshop and saved them again w\/o the interlace Deleted all the images in my Resources folder and added them again by dragging\/dropping the images again Deleted ALL PNG images (left the JPGs) and it works&#8230;when i add one PNG, Xcode throws a hissy fit. Deleted the derivedData in my ~Library<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/8c13cb94c1f2e4d62c6a7dbd33bcd4bc?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\niPatel<br \/>\nios objective-c xcode ios6<br \/>\nI am getting this warning in Xcode&#8230;plz give me idea to solve this warning issueUsing the font Tahoma in versions of Xcode prior to 4.2 may have unexpected results.iOS<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a3d6ede2ac668a4436a99af2b7d7f6be?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nshawnwall<br \/>\nobjective-c ios6 uiappearance<br \/>\nBelow code is perfectly working fine iOS 5, but not on iOS 6 or above. What I want that for Email composer sheet the navigationBar image will be different then other UINavigationBar classes. I can&#8217;t understand that debug pointer is responding the appearance method but on device it shows navigationBar image as &#8220;bgNavigationBar.png&#8221;; expected is &#8220;bgNavigationBar_2.png&#8221;.Please guide me&#8230;&#8230;.if ([[UINavigationBar class]respondsToSelector:@selector(appearance)]) {UIImage *logoImage44 = [[UIImage im<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/32cdc777a19a6f2b2129decd30061cd1?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nkender<br \/>\niphone cocoa-touch memory-management cocos2d-iphone<br \/>\nI have an iPhone application in Cocos2d that sometimes crashes on actual device, due to memory problems. What I have so far found out is that the scenes, when switched, aren&#8217;t fully released &#8211; the [retainCount] for them is somewhat about 4-10 \ud83d\ude42 The dealloc method never gets called, and then I assume, when I switch the scenes a few times, the memory issue shows up. I&#8217;m wondering &#8211; where should I relese the scene? Since it has number of children, I suppose I should be doing a cleanup-removal of t<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/996952de195a8bc83b2421e49a754e7d?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nLearnCocos2D<br \/>\ncocos2d-iphone uialertview<br \/>\nI am trying to lay buttons on top of a background image for a UIAlertView in Cocos2d. Its not working with the code below. any suggestions?UIAlertView *Win=[[UIAlertView alloc] initWithTitle:@&#8221;You Win&#8221; message:nil delegate:self cancelButtonTitle:@&#8221;Next&#8221; otherButtonTitles:@&#8221;Replay&#8221;,@&#8221;Quit&#8221;, nil];UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(-50, -30, 400, 300)];NSString *path = [[NSString alloc] initWithString:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathCom<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/09c3d801fb82afdfd7e2715d95e1bab5?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nWhite Money<br \/>\niphone cocos2d cocos2d-iphone<br \/>\nI&#8217;m wonderring that what&#8217;s the difference between ccTouchesCancelled and ccTouchesEnded events in Cocos2d?Thanks! Tien<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/pJmdo.jpg?s=32&amp;g=1\" \/><br \/>\nOpenLearner<br \/>\ncocos2d-iphone cocos2d<br \/>\nI have a simple CCRotateBy action in a sequence; it is followed by a call to another method which confirms that the CCRotateBy completed (otherwise, that CCCallFunc would not get called in the sequence if CCRotateBy didn&#8217;t complete):-(void)correctRotation{if (self.rotationAmount){CCLOG(@&#8221;correcting rotation inside: %i&#8221;,self.buildNum);CCRotateBy*second=[CCRotateBy actionWithDuration:1 angle:-self.rotationAmount];CCEaseBackInOut*bounce2=[CCEaseBackInOut actionWithAction:second];CCCallFunc*func=[CC<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/Y6tnm.png?s=32&amp;g=1\" \/><br \/>\n25 revs, 2 users 100%Lukasz<br \/>\niphone cocos2d-iphone opengl-es-2.0 alpha blending<br \/>\nI have very simple CCScene with ONLY 1 CCLayer containing:CCSprite for background with standard blending mode CCRenderTexture to draw paint brushes, with its sprite attached to root CCLayer above background sprite:_bgSprite = [CCSprite spriteWithFile:backgroundPath]; _renderTexture = [CCRenderTexture renderTextureWithWidth:self.contentSize.width height:self.contentSize.height]; [_renderTexture.sprite setBlendFunc:(ccBlendFunc){GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA}]; [self addChild:_bgSprite z:-1<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/7f4ee98206d84b25a83228e285c678f0?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nGeoffroy<br \/>\nc++ cocos2d-iphone copywithzone<br \/>\nI have some trouble.I made some interface (abstract class in c++). Implemented it in my class (derived from CCObject too). In third class I try to invoke method of interface and got SIGABORT. Here the code\/\/interface classclass CallBackInterface{public:virtual void SomeMethod() = 0;};\/\/my class that implement the interface class MyClass : public CallBackInterface, public CCObject{public:void SomeMethod(){\/*some realization*\/}; };\/\/class that invoke the SomeMethodclass CallBacker(){public:CallBa<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/dea18ef2f45c722dba24e63a992825ed?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMason<br \/>\nios cocos2d-iphone<br \/>\nI think I might be causing a bug in my code because I&#8217;m unclear about what the cleanup: part of removeChild:cleanup: method of cocos2d ccnode class.Thanks.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/3af3b1eaf4a5e968bcc96bc70841bbfb?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\noopology<br \/>\nobjective-c cocos2d-iphone nsarray<br \/>\nWhat are the differences between NSArray and CCArray? Also, in what cases will one be preferred to the other with respect to game programming?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/f21a1cddb3764e27fa69a5cb8ca3d03d?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSushi Ninja<br \/>\nios cocos2d-iphone<br \/>\nI&#8217;m currently trying to create an endlessly scrolling background with a character who jumps up and down and collects items that come along the way. My problem lies with the items that need to be created and then moved.I&#8217;ve looked at CCSpriteBatchNode and NSMutableArray but I&#8217;m not sure which to use.I reviewed Steffen Itterheim&#8217;s example from his book regarding creating bullets while initializing and then using them when needed. I thought that this would be inefficient and taxing on the iPhone. A<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/808ba667d45cea35164ec83de49b0de8?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJust Kidding<br \/>\nobjective-c cocos2d-iphone<br \/>\nI&#8217;m using a Objective-C framework for game development called Cocos2d-iphone.This is how I create a button-graphic in the game:CCMenuItemImage *battle;battle = [CCMenuItemImage itemFromNormalImage:@&#8221;BattleFightOption1.png&#8221; selectedImage:@&#8221;BattleFightOption2.png&#8221;target:self selector:@selector(battleFightOption)];Basically, when the user clicks the button, method battleFightOption runs.But I wonder, I never did define battleFightOption in the interface.. so, my question is: when is it necessary to<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a4c839f9afdbf8b75938181dac77e544?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nhemant<br \/>\nios cocos2d-iphone sprite-sheet texturepacker<br \/>\nI am animating a whole body through SpriteSheets with CCSpriteBatchNode and CCSpriteFrameCache. Now user can add his own pic to that body which when i try to addChild to Spritesheet crashes with error &#8220;CCSprite is not using the same texture id&#8221; Now i know the face CCSprite was not in that cache\/texture(it was created through texturepacker) and the crash was normal but i wanted to know if there was a workaround to this as i have to add a face to that body through user interaction and animate that<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/7a4b2811e8da375f2aed10806676d21c?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nKsK<br \/>\nios6 cocos2d-iphone sprite-sheet<br \/>\nI have create a sprite sheet for non retina display and its working fine on simulator.. I have used the code -(Void)addSprites{[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@&#8221;image.plist&#8221;];CCSpriteBatchNode *spriteSheet = [CCSpriteBatchNode batchNodeWithFile:@&#8221;image.png&#8221;];[self addChild:spriteSheet];\/\/ Load up the frames of our animationNSMutableArray *walkAnimFrames = [NSMutableArray array];for(int i = 1; i &lt; 5; i++) {[walkAnimFrames addObject:[[CCSpriteFrameCache sha<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/6731745b602d7951d55e4a605a2f86e6?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nScott Pfeil<br \/>\niphone cocos2d cocos2d-iphone sprite sprite-sheet<br \/>\nI&#8217;m trying to use more than one sprite sheet because I can&#8217;t fit them all on one and having two makes my ordering them easier (sprite sheet one sprites are in the back and have a lower zOrder). I&#8217;m currently doing:spriteSheet1 = [[CCSpriteSheet spriteSheetWithFile:@&#8221;spriteSheet1.png&#8221; capacity:3] retain]; [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@&#8221;spriteSheet1.plist&#8221;]; [self addChild:spriteSheet1];spriteSheet2 = [[CCSpriteSheet spriteSheetWithFile:@&#8221;spriteSheet2.pn<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tullio Onion Sebastiani iphone objective-c ios6 storyboard navigationcontroller I&#8217;m developing an iOS6 App with storyboards and i&#8217;m encountering an unexpected beahviour. My app is almost in portrait mode , and i would keep this orientation in all the views except two.For this reason the project supports both landscape and portrait mode, i&#8217;ve subclassed navigation controller [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3299","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3299","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3299"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3299\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}