[英]iCarousel View in a table cell view does not scroll at all
我將 iCarousel 視圖放在表視圖中並嘗試滾動 iCarousel,但問題是它根本不可滾動。
我可以在單元格中看到 iCarousel,如下所示:
我把 iCarousel 數據源和委托放在 tableView 控制器中,創建一個客戶函數來設置 iCarousel 數據源和委托。
在 CustomTableViewCell 中,我只定義了設置委托函數:
- (void) setICarouselDataSourceDelegate: (id<iCarouselDelegate,iCarouselDataSource>)dataSourceDelegate {
self.carousel.dataSource = dataSourceDelegate;
self.carousel.delegate = dataSourceDelegate;
[self.carousel reloadData];
}
在 MainTableView 中,我調用了 DataSourceDelegate
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
目前我在表格視圖單元格中使用 iCarousel,它可以輕松滾動。
首先,iCarousel 不是任何標准視圖......你應該把你正在使用的控件的鏈接
其次,似乎 iCarousel 使用 UIScrollView 並且 UITableView 也派生自 UIScrollView 將滾動視圖放在另一個滾動視圖中從來都不是一個好主意。
這可能是您的表格視圖不滾動的原因......順便說一句,您是在談論水平滾動還是垂直滾動?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.