Ejemplo n.º 1
0
ScrollView* ScrollView::create()
{
    ScrollView* widget = new (std::nothrow) ScrollView();
    if (widget && widget->init())
    {
        widget->autorelease();
        return widget;
    }
    CC_SAFE_DELETE(widget);
    return nullptr;
}
Ejemplo n.º 2
0
ScrollView* ScrollView::create()
{
    ScrollView* pRet = new (std::nothrow) ScrollView();
    if (pRet && pRet->init())
    {
        pRet->autorelease();
    }
    else
    {
        CC_SAFE_DELETE(pRet);
    }
    return pRet;
}
Ejemplo n.º 3
0
ScrollView* ScrollView::create(const cocos2d::Size& size)
{
	ScrollView* pRet = new (std::nothrow) ScrollView();
	if (pRet && pRet->init(size))
	{
		pRet->autorelease();
	}
	else
	{
		CC_SAFE_DELETE(pRet);
	}
	return pRet;
}