diff options
author | Samantha Houts <samantha@teamredwall.com> | 2016-09-13 04:39:36 -0700 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2016-09-13 12:39:36 +0100 |
commit | d8f939ff6eee0a8f2ecc9392cbdb898e3d140d8b (patch) | |
tree | 35a49d9322afeb1269b13333d8adf4548cd34a7b /Xamarin.Forms.ControlGallery.iOS | |
parent | 06698acfb981431e44b9b1444823033dfffac3ee (diff) | |
download | xamarin-forms-d8f939ff6eee0a8f2ecc9392cbdb898e3d140d8b.tar.gz xamarin-forms-d8f939ff6eee0a8f2ecc9392cbdb898e3d140d8b.tar.bz2 xamarin-forms-d8f939ff6eee0a8f2ecc9392cbdb898e3d140d8b.zip |
[iOS] ViewCells with Accessories will be properly laid out again (#338)
* Add repro for 43161
* [iOS] Don't adjust ViewCell Bounds when there is an Accessory
* [iOS] Fix spacing
Diffstat (limited to 'Xamarin.Forms.ControlGallery.iOS')
-rw-r--r-- | Xamarin.Forms.ControlGallery.iOS/CustomRenderers.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Xamarin.Forms.ControlGallery.iOS/CustomRenderers.cs b/Xamarin.Forms.ControlGallery.iOS/CustomRenderers.cs index 92b58455..c89e9ef2 100644 --- a/Xamarin.Forms.ControlGallery.iOS/CustomRenderers.cs +++ b/Xamarin.Forms.ControlGallery.iOS/CustomRenderers.cs @@ -29,6 +29,7 @@ using MonoTouch.CoreLocation; [assembly: ExportRenderer(typeof(NativeListView), typeof(NativeListViewRenderer))] [assembly: ExportRenderer(typeof(CustomMapView), typeof(CustomIOSMapRenderer))] [assembly: ExportRenderer(typeof(TabbedPage), typeof(TabbedPageWithCustomBarColorRenderer))] +[assembly: ExportRenderer(typeof(Bugzilla43161.AccessoryViewCell), typeof(AccessoryViewCellRenderer))] namespace Xamarin.Forms.ControlGallery.iOS { public class CustomIOSMapRenderer : ViewRenderer<CustomMapView, MKMapView> @@ -604,5 +605,21 @@ namespace Xamarin.Forms.ControlGallery.iOS //UITabBar.Appearance.BarTintColor = UIColor.Purple; } } + + public class AccessoryViewCellRenderer : ViewCellRenderer + { + public override UITableViewCell GetCell(Cell item, UITableViewCell reusableCell, UITableView tv) + { + var cell = base.GetCell(item, reusableCell, tv); + + // remove highlight on selected cell + cell.SelectionStyle = UITableViewCellSelectionStyle.None; + + // iOS right arrow + cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; + + return cell; + } + } } |