本文整理汇总了C#中UICollectionView.DequeueReusableSupplementaryView方法的典型用法代码示例。如果您正苦于以下问题:C# UICollectionView.DequeueReusableSupplementaryView方法的具体用法?C# UICollectionView.DequeueReusableSupplementaryView怎么用?C# UICollectionView.DequeueReusableSupplementaryView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UICollectionView
的用法示例。
在下文中一共展示了UICollectionView.DequeueReusableSupplementaryView方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetViewForSupplementaryElement
public override UICollectionReusableView GetViewForSupplementaryElement(UICollectionView collectionView, NSString elementKind, NSIndexPath indexPath)
{
if (elementKind == (NSString)"UICollectionElementKindSectionHeader") {
PictureHeaderVIew header = (PictureHeaderVIew)collectionView.DequeueReusableSupplementaryView
(UICollectionElementKindSection.Header, (NSString)"header", indexPath);
header.title.Frame = new RectangleF (20, 15, 230, 300);
header.title.Text = Items.Title;
header.title.Lines = 0;
header.title.SizeToFit ();
header.photo.Image = UIImage.FromFile ("./Assets/photo.png");
header.picturesCount.Text = Items.Images.Count.ToString();
return header;
}
else {
StartReadingView footer = (StartReadingView)collectionView.DequeueReusableSupplementaryView
(UICollectionElementKindSection.Footer, (NSString)"collectionfooter", indexPath);
footer.StartReading.SetBackgroundImage (UIImage.FromFile ("./Assets/buttonlong.png"), UIControlState.Normal);
footer.StartReading.TouchUpInside += (object sender, EventArgs e) => {
UIStoryboard board = UIStoryboard.FromName ("MainStoryboard", null);
var prefs = (PreferencesSubController)board.InstantiateViewController ("preferencessub");
this.NavigationController.PushViewController(prefs, true);
};
return footer;
}
}
示例2: GetViewForSupplementaryElement
// TODO: Step 2c: uncomment to get a header instance to use for the Supplementary View
public override UICollectionReusableView GetViewForSupplementaryElement (UICollectionView collectionView, NSString elementKind, NSIndexPath indexPath)
{
// get a Header instance to use for the supplementary view
var headerView = (Header)collectionView.DequeueReusableSupplementaryView (elementKind, headerId, indexPath);
headerView.Text = "Evolve Speakers";
return headerView;
}
示例3: GetViewForSupplementaryElement
public override UICollectionReusableView GetViewForSupplementaryElement(UICollectionView collectionView, NSString elementKind, NSIndexPath indexPath)
{
if (elementKind == (NSString)"UICollectionElementKindSectionHeader") {
return (UICollectionReusableView)collectionView.DequeueReusableSupplementaryView
(UICollectionElementKindSection.Header, (NSString)"collectionheader", indexPath);
} else {
StartReadingView footer = (StartReadingView)collectionView.DequeueReusableSupplementaryView
(UICollectionElementKindSection.Footer, (NSString)"collectionfooter", indexPath);
footer.StartReading.SetBackgroundImage (UIImage.FromFile ("./Assets/buttonlong.png"), UIControlState.Normal);
if (!attached) {
footer.StartReading.TouchUpInside += (object sender, EventArgs e) => {
var tabbar = new MainTabController ();
UIApplication.SharedApplication.Delegate.Window.RootViewController = tabbar;
};
attached = true;
}
return footer;
}
}
示例4: GetViewForSupplementaryElement
public override UICollectionReusableView GetViewForSupplementaryElement(UICollectionView collectionView, NSString elementKind, NSIndexPath indexPath)
{
if (elementKind == UICollectionElementKindSectionKey.Header)
{
var header = collectionView.DequeueReusableSupplementaryView(UICollectionElementKindSection.Header, QuickCurrencyHeaderCell.Key, indexPath) as QuickCurrencyHeaderCell;
header.Setup(CurrentBaseCurrency, CurrentBaseCurrencyAmount);
UITapGestureRecognizer guesture = new UITapGestureRecognizer(() =>
{
HeaderTapped();
})
{
NumberOfTapsRequired = 1
};
header.AddGestureRecognizer(guesture);
return header;
}
return null;
}
示例5: GetViewForSupplementaryElement
public override UICollectionReusableView GetViewForSupplementaryElement(UICollectionView collectionView, NSString elementKind, NSIndexPath indexPath)
{
var headerView = (Header) collectionView.DequeueReusableSupplementaryView (elementKind, headerId, indexPath);
headerView.Center = collectionView.Center;
return headerView;
}
示例6: GetViewForSupplementaryElement
public override UICollectionReusableView GetViewForSupplementaryElement(UICollectionView collectionView, NSString elementKind, NSIndexPath indexPath)
{
_headerView = (HeaderView)collectionView.DequeueReusableSupplementaryView (elementKind, headerId, indexPath);
_headerView.TileGrid = _tileGrid;
return _headerView;
}