Advertisement
Guest User

Untitled

a guest
Apr 9th, 2020
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.24 KB | None | 0 0
  1. using Foundation;
  2. using Xamarin.Forms;
  3. using Xamarin.Forms.Platform.iOS;
  4.  
  5. [assembly: ExportRenderer(typeof(CollectionView), typeof(CollectionViewRenderer2))]
  6. namespace TestAnimationForms.iOS
  7. {
  8.     public class CollectionViewRenderer2 : CollectionViewRenderer
  9.     {
  10.         protected override GroupableItemsViewController<GroupableItemsView> CreateController(GroupableItemsView itemsView, ItemsViewLayout layout)
  11.         {
  12.             return new CustomGroupableItemsViewController(itemsView, layout);
  13.         }
  14.     }
  15.  
  16.     public class CustomGroupableItemsViewController : GroupableItemsViewController<GroupableItemsView>
  17.     {
  18.         public CustomGroupableItemsViewController(GroupableItemsView groupableItemsView, ItemsViewLayout layout) : base(groupableItemsView, layout)
  19.         {
  20.         }
  21.  
  22.         protected override void UpdateTemplatedCell(TemplatedCell cell, NSIndexPath indexPath)
  23.         {
  24.             cell.SelectedBackgroundView = null;
  25.             base.UpdateTemplatedCell(cell, indexPath);
  26.         }
  27.  
  28.         protected override void UpdateDefaultCell(DefaultCell cell, NSIndexPath indexPath)
  29.         {
  30.             cell.SelectedBackgroundView = null;
  31.             base.UpdateDefaultCell(cell, indexPath);
  32.         }
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement