MyTableViewCell* MyTableViewCell::create(CCLabelTTF* textLabel, CCLabelTTF* detailLabel, CCSprite *imageSprite) { MyTableViewCell* pRet = new MyTableViewCell(); if (pRet && pRet->initWithLabel(textLabel, detailLabel, imageSprite)){ pRet->autorelease(); }else{ CC_SAFE_DELETE(pRet); } return pRet; }
MyTableViewCell* MyTableViewCell::create(const std::string& identifier) { //CATableViewCell* tableViewCell = new CATableViewCell(); MyTableViewCell* tableViewCell = new MyTableViewCell(); if(tableViewCell&&tableViewCell->initWithReuseIdentifier(identifier)) { tableViewCell->autorelease(); return tableViewCell; } CC_SAFE_DELETE(tableViewCell); return NULL; }