diff options
author | Samantha Houts <samantha@teamredwall.com> | 2016-06-17 03:10:18 -0700 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2016-06-17 11:10:18 +0100 |
commit | 925fc0aa588a060eb23fa16c1d225dd030012c23 (patch) | |
tree | 83676c25c29d97d9250516b217020ba85425796d /Xamarin.Forms.Platform.iOS/ContextActionCell.cs | |
parent | d44396a4534b1e2bc81143c809e4adaee656ab15 (diff) | |
download | xamarin-forms-925fc0aa588a060eb23fa16c1d225dd030012c23.tar.gz xamarin-forms-925fc0aa588a060eb23fa16c1d225dd030012c23.tar.bz2 xamarin-forms-925fc0aa588a060eb23fa16c1d225dd030012c23.zip |
Prep Cell & friends for removal of InternalsVisibleTo (#142)
* Prep Cell & friends for removal of InternalsVisibleTo
Includes:
- Cell
- EntryCell
- ListView
- MenuItem
- TableView
- ViewCell
- Toolbar
Moved extensions to Internal & removed TPH
* Update docs
* [Controls] Ignore Issue2411 on iOS <9
* [Controls] Formatting for Issue2411
Diffstat (limited to 'Xamarin.Forms.Platform.iOS/ContextActionCell.cs')
-rw-r--r-- | Xamarin.Forms.Platform.iOS/ContextActionCell.cs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Xamarin.Forms.Platform.iOS/ContextActionCell.cs b/Xamarin.Forms.Platform.iOS/ContextActionCell.cs index a2409c62..5d50d31d 100644 --- a/Xamarin.Forms.Platform.iOS/ContextActionCell.cs +++ b/Xamarin.Forms.Platform.iOS/ContextActionCell.cs @@ -131,7 +131,7 @@ namespace Xamarin.Forms.Platform.iOS public void Update(UITableView tableView, Cell cell, UITableViewCell nativeCell) { - var parentListView = cell.RealParent as ListView; + var parentListView = cell.RealParent as IListViewController; var recycling = parentListView != null && parentListView.CachingStrategy == ListViewCachingStrategy.RecycleElement; if (_cell != cell && recycling) { @@ -342,7 +342,7 @@ namespace Xamarin.Forms.Platform.iOS _scroller.SetContentOffset(new PointF(0, 0), true); MenuItem mi; if (weakItem.TryGetTarget(out mi)) - mi.Activate(); + ((IMenuItemController)mi).Activate(); }); actionSheet.AddAction(action); } @@ -419,7 +419,7 @@ namespace Xamarin.Forms.Platform.iOS button.SetTitle(item.Text, UIControlState.Normal); button.TitleEdgeInsets = new UIEdgeInsets(0, 15, 0, 15); - button.Enabled = item.IsEnabled; + button.Enabled = ((IMenuItemController)item).IsEnabled; return button; } @@ -460,7 +460,7 @@ namespace Xamarin.Forms.Platform.iOS else { _scroller.SetContentOffset(new PointF(0, 0), true); - _cell.ContextActions[(int)button.Tag].Activate(); + ((IMenuItemController)_cell.ContextActions[(int)button.Tag]).Activate(); } } @@ -468,7 +468,7 @@ namespace Xamarin.Forms.Platform.iOS { if (e.PropertyName == "HasContextActions") { - var parentListView = _cell.RealParent as ListView; + var parentListView = _cell.RealParent as IListViewController; var recycling = parentListView != null && parentListView.CachingStrategy == ListViewCachingStrategy.RecycleElement; if (!recycling) ReloadRow(); @@ -477,7 +477,7 @@ namespace Xamarin.Forms.Platform.iOS void OnContextItemsChanged(object sender, NotifyCollectionChangedEventArgs e) { - var parentListView = _cell.RealParent as ListView; + var parentListView = _cell.RealParent as IListViewController; var recycling = parentListView != null && parentListView.CachingStrategy == ListViewCachingStrategy.RecycleElement; if (recycling) Update(_tableView, _cell, ContentCell); @@ -488,7 +488,7 @@ namespace Xamarin.Forms.Platform.iOS void OnMenuItemPropertyChanged(object sender, PropertyChangedEventArgs e) { - var parentListView = _cell.RealParent as ListView; + var parentListView = _cell.RealParent as IListViewController; var recycling = parentListView != null && parentListView.CachingStrategy == ListViewCachingStrategy.RecycleElement; if (recycling) Update(_tableView, _cell, ContentCell); @@ -708,7 +708,7 @@ namespace Xamarin.Forms.Platform.iOS // do not activate a -1 index when dismissing by clicking outside the popover if (buttonIndex >= 0) - Items[(int)buttonIndex].Activate(); + ((IMenuItemController)Items[(int)buttonIndex]).Activate(); } } } |