示例#1
0
void CAListView::update(float dt)
{
    CAScrollView::update(dt);
    
	recoveryCollectionCell();

	loadCollectionCell();
}
void CACollectionView::update(float dt)
{
	CAScrollView::update(dt);
    
	recoveryCollectionCell();
    
	loadCollectionCell();
    
	updateSectionHeaderAndFooterRects();
}
示例#3
0
void CAListView::reloadData()
{
    if (m_pListViewDataSource == NULL)
        return;
    
    this->reloadViewSizeData();
    
	this->removeAllSubviews();
    
    DRect winRect = this->getBounds();
    winRect.origin = this->getContentOffset();
    
    if (m_nListHeaderHeight > 0)
    {
        if (m_pListHeaderView)
        {
            m_pListHeaderView->setFrame(m_rHeaderRect);
            addSubview(m_pListHeaderView);
        }
    }
	
    unsigned int cellCount = m_pListViewDataSource->numberOfIndex(this);
    for (unsigned i = 0; i < cellCount; i++)
    {
		if (m_nIndexs > 0)
		{
			m_mpUsedListCells.insert(std::make_pair(i, (CAListViewCell*)NULL));
		}
    }
    
    if (m_nListFooterHeight > 0)
    {
        if (m_pListFooterView)
        {
            m_pListFooterView->setFrame(m_rFooterRect);
            addSubview(m_pListFooterView);
        }
    }
	loadCollectionCell();
    this->layoutPullToRefreshView();
    this->startDeaccelerateScroll();
}