我正在尝试使用自定义渲染器在我的Xamarin.Forms项目中关闭CollectionView对iOS的反弹效果。我能够在ListView中使用下面的代码来实现这一点: if (e.NewElement != null)
{
var listView = Control as UITableView;
Control.Bounces = false;
} 但CollectionView控件中的Bounces属性不可用。有没有其他方法可以做到这一点?
我收到一个错误:
Assertion failure in -[UICollectionViewData numberOfItemsBeforeSection:],/SourceCache/UIKit_Sim/UIKit-2935.137/UICollectionViewData.m
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'request for number of items before section 2 whe
我正在使用ScrollView。在我的滚动视图中有一个集合视图。我的集合视图最后3个元素隐藏在空白中。在滚动的ScrollView上,他们不会在滚动的CollectionView上显示。我想在滚动ScrollView上显示所有集合单元。而不是滚动CollectionView。
-(NSInteger)numberOfSectionsInCollectionView:
(UICollectionView *)collectionView {
return 1; // The number of sections we want
}
-(NSInteger)collectionView: