UILabel* UILabel::create() { UILabel *node = new UILabel(); if (node) { node->autorelease(); return node; } CC_SAFE_DELETE(node); return NULL; }
UILabel* UILabel::create() { UILabel* widget = new UILabel(); if (widget && widget->init()) { widget->autorelease(); return widget; } CC_SAFE_DELETE(widget); return nullptr; }
NS_CC_BEGIN UILabel* UILabel::create(const char *content,float fontSize) { UILabel *node = new UILabel(); if (node) { if (node->initWithContent(content,fontSize)) { node->autorelease(); return node; } } CC_SAFE_DELETE(node); return NULL; }