MCPcopy Create free account
hub / github.com/9miao/CrossApp / removeAllSubviews

Method removeAllSubviews

CrossApp/view/CAView.cpp:1105–1135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1103}
1104
1105void CAView::removeAllSubviews()
1106{
1107 // not using detachSubview improves speed here
1108 if (!m_obSubviews.empty())
1109 {
1110 if (m_pobBatchView)
1111 {
1112 CAVector<CAView*>::iterator itr;
1113 for (itr=m_obSubviews.begin(); itr!=m_obSubviews.end(); itr++)
1114 {
1115 m_pobBatchView->removeViewFromAtlas(*itr);
1116 }
1117 }
1118
1119 CAVector<CAView*>::iterator itr;
1120 for (itr=m_obSubviews.begin(); itr!=m_obSubviews.end(); itr++)
1121 {
1122 if(m_bRunning)
1123 {
1124 (*itr)->onExitTransitionDidStart();
1125 (*itr)->onExit();
1126 }
1127
1128 (*itr)->setSuperview(NULL);
1129 }
1130
1131 m_obSubviews.clear();
1132 }
1133
1134 m_bHasChildren = false;
1135}
1136
1137
1138void CAView::detachSubview(CAView *subview)

Callers 14

viewDidUnloadMethod · 0.45
reloadDataMethod · 0.45
reloadDataMethod · 0.45
updateWithImageMethod · 0.45
reloadDataMethod · 0.45
reloadDataMethod · 0.45
reloadDataMethod · 0.45

Calls 8

removeViewFromAtlasMethod · 0.80
setSuperviewMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
onExitMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected