我用下面的代碼來創建UIRefreshControl
:UIRefreshControl顯示上述UICollectionViews細胞
_refreshControl = new UIRefreshControl();
_refreshControl.ValueChanged += RefreshTriggered;
_collectionView.InsertSubview(_refreshControl, 0);
而我沒有,爲什麼UIRefreshControl
被繪製在UICollectionViewCell
小號任何想法。
這裏是當我剛添加的刷新控制的UICollectionView
的子視圖:
[0]: {<UIRefreshControl: 0x7c132fe0; frame = (0 0; 594 60); hidden = YES; autoresize = W; layer = <CALayer: 0x7c133250>>}
[1]: {<UIImageView: 0x79f8a5d0; frame = (3 588.5; 588 2.5); alpha = 0; opaque = NO; autoresize = TM; userInteractionEnabled = NO; layer = <CALayer: 0x79f89a70>> - (null)}
[2]: {<UIImageView: 0x79fab7d0; frame = (588.5 584; 2.5 7); alpha = 0; opaque = NO; autoresize = LM; userInteractionEnabled = NO; layer = <CALayer: 0x796171f0>> - (null)}
這裏是當項目在UICollectionView加載的子視圖:
[0]: {<MovieCollectionViewCell: 0x796e7350; baseClass = UICollectionViewCell; frame = (0 0; 183 278.16); clipsToBounds = YES; opaque = NO; layer = <CALayer: 0x7c244bc0>>}
[1]: {<MovieCollectionViewCell: 0x7c2b5850; baseClass = UICollectionViewCell; frame = (186 0; 183 278.16); clipsToBounds = YES; opaque = NO; layer = <CALayer: 0x7c2b5950>>}
[2]: {<MovieCollectionViewCell: 0x7c2ba7d0; baseClass = UICollectionViewCell; frame = (0 281; 183 278.16); clipsToBounds = YES; opaque = NO; layer = <CALayer: 0x7c2ba8d0>>}
[3]: {<MovieCollectionViewCell: 0x7c2bf440; baseClass = UICollectionViewCell; frame = (186 281; 183 278.16); clipsToBounds = YES; opaque = NO; layer = <CALayer: 0x7c2bf540>>}
[4]: {<MovieCollectionViewCell: 0x7c2c42d0; baseClass = UICollectionViewCell; frame = (0 562.5; 183 278.16); clipsToBounds = YES; hidden = YES; opaque = NO; layer = <CALayer: 0x7c2c43d0>>}
[5]: {<MovieCollectionViewCell: 0x7c2c9160; baseClass = UICollectionViewCell; frame = (186 562.5; 183 278.16); clipsToBounds = YES; hidden = YES; opaque = NO; layer = <CALayer: 0x7c2c9260>>}
[6]: {<UIRefreshControl: 0x7c132fe0; frame = (0 -69.5; 369 60); autoresize = W; layer = <CALayer: 0x7c133250>>}
[7]: {<UIImageView: 0x7c159e80; frame = (3 522; 363 2.5); alpha = 0; opaque = NO; autoresize = TM; userInteractionEnabled = NO; layer = <CALayer: 0x7c159fb0>> - (null)}
[8]: {<UIImageView: 0x7c15a480; frame = (363.5 -66.5; 2.5 224); opaque = NO; autoresize = LM; userInteractionEnabled = NO; layer = <CALayer: 0x7c15a5b0>> - (null)}
任何人的想法?
那麼這個工作,我打算把它標記爲已解決,但我想看看爲什麼發生這種情況的解釋。我認爲這是Xamarin或iOS中的一個錯誤。 – vrwim
看我的編輯。只要我記得,事情一直在以這種方式工作,所以我不會把它稱爲一個錯誤,只是你需要知道的東西...... – deadbeef