diff options
Diffstat (limited to 'Xamarin.Forms.ControlGallery.iOS/CustomRenderers.cs')
-rw-r--r-- | Xamarin.Forms.ControlGallery.iOS/CustomRenderers.cs | 58 |
1 files changed, 8 insertions, 50 deletions
diff --git a/Xamarin.Forms.ControlGallery.iOS/CustomRenderers.cs b/Xamarin.Forms.ControlGallery.iOS/CustomRenderers.cs index c89e9ef2..6b2ab38f 100644 --- a/Xamarin.Forms.ControlGallery.iOS/CustomRenderers.cs +++ b/Xamarin.Forms.ControlGallery.iOS/CustomRenderers.cs @@ -1,27 +1,15 @@ using System; -using Xamarin.Forms.Controls; -using Xamarin.Forms; -using Xamarin.Forms.Platform.iOS; -using Xamarin.Forms.ControlGallery.iOS; using System.Collections.Generic; -using System.Linq; -using System.Drawing; -using System.Collections; - -#if __UNIFIED__ -using UIKit; -using MapKit; using CoreLocation; using Foundation; +using MapKit; +using UIKit; +using Xamarin.Forms; +using Xamarin.Forms.ControlGallery.iOS; +using Xamarin.Forms.Controls; +using Xamarin.Forms.Platform.iOS; using RectangleF = CoreGraphics.CGRect; -#else -using MonoTouch.UIKit; -using MonoTouch.Foundation; -using MonoTouch.MapKit; -using MonoTouch.CoreLocation; -#endif - [assembly: ExportRenderer(typeof(Bugzilla21177.CollectionView), typeof(CollectionViewRenderer))] [assembly: ExportRenderer(typeof(Bugzilla31395.CustomContentView), typeof(CustomContentRenderer))] [assembly: ExportRenderer(typeof(NativeCell), typeof(NativeiOSCellRenderer))] @@ -326,7 +314,7 @@ namespace Xamarin.Forms.ControlGallery.iOS public IEnumerable<DataSource> Items { //get{ } - set { _tableItems = new List<DataSource>(value); } + set { _tableItems = new List<DataSource>(value); } } public NativeiOSListViewSource(NativeListView2 view) @@ -339,19 +327,10 @@ namespace Xamarin.Forms.ControlGallery.iOS /// Called by the TableView to determine how many cells to create for that particular section. /// </summary> -#if __UNIFIED__ public override nint RowsInSection(UITableView tableview, nint section) { return _tableItems.Count; } -#else - public override int RowsInSection (UITableView tableview, int section) - { - return _tableItems.Count; - } - -#endif - #region user interaction methods @@ -419,19 +398,11 @@ namespace Xamarin.Forms.ControlGallery.iOS _listView = view; } -#if __UNIFIED__ public override nint RowsInSection(UITableView tableview, nint section) { return _tableItems.Count; } -#else - public override int RowsInSection (UITableView tableview, int section) - { - return _tableItems.Count; - } -#endif - #region user interaction methods public override void RowSelected(UITableView tableView, NSIndexPath indexPath) @@ -537,10 +508,9 @@ namespace Xamarin.Forms.ControlGallery.iOS public override void ViewDidLoad() { base.ViewDidLoad(); - CollectionView.RegisterClassForCell(typeof (CollectionViewCell), cellId); + CollectionView.RegisterClassForCell(typeof(CollectionViewCell), cellId); } -#if __UNIFIED__ public override nint NumberOfSections(UICollectionView collectionView) { return 1; @@ -551,18 +521,6 @@ namespace Xamarin.Forms.ControlGallery.iOS return items.Count; } -#else - public override int NumberOfSections (UICollectionView collectionView) - { - return 1; - } - - public override int GetItemsCount (UICollectionView collectionView, int section) - { - return items.Count; - } -#endif - public override UICollectionViewCell GetCell(UICollectionView collectionView, NSIndexPath indexPath) { var cell = (CollectionViewCell)collectionView.DequeueReusableCell(cellId, indexPath); |