Clear content of UIScrollView

前端 未结 6 440
盖世英雄少女心
盖世英雄少女心 2021-01-04 04:24

I have an iPhone application that uses a timer and at every time interval it creates some UILabel controls and adds them into a UIScrollView.

6条回答
  •  时光取名叫无心
    2021-01-04 05:12

    I typically go with a one liner like this: in case you're interested..

    while(scrollView.subviews.count > 0) [[scrollView.subviews objectAtIndex:0] removeFromSuperview];
    

提交回复
热议问题