I'm doing the following:
#import <Foundation/Foundation.h>
#import "CCMenuItem.h"
@interface SmartMenuItem : CCMenuItemSprite {
}
@end
Then I want to use my class:
SmartMenuItem *playItem = [SmartMenuItem itemFromNormalSprite:play
                                                     selectedSprite:playPressed
                                                             target:self 
                                                           selector:@selector(onPlayPressed)];
SmartMenuItem *optionsItem = [SmartMenuItem itemFromNormalSprite:options
                                                        selectedSprite:optionsPressed
                                                                target:self
                                                              selector:@selector(onOptionsPressed)];
[menu_ addChild:playItem];
[menu_ addChild:optionsItem];
And i got errors and warnings. Menu accepts CCMenuItemSprite as child. Bu开发者_JAVA技巧t xcode says: Cannot initialize a parameter of type CCNode* with an lvalue of type SmartMenuItem*.
And also it gives warnings when i'm creating playItem and optionsItem: method not found. But it is a static method of CCmenuItemSprite!
What's the problem ?
Solved. The problem was in adding files to xcode project. They were shared incorrectly.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论