From 52c674a510517f3d2643e21908584cda159096ce Mon Sep 17 00:00:00 2001 From: Nedyalko Nikolov Date: Fri, 13 Nov 2015 11:06:51 +0200 Subject: [PATCH] Fixed problem with iOS 7 and ListView rowHeight. --- ui/frame/frame.ios.ts | 4 ++-- ui/list-view/list-view.ios.ts | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ui/frame/frame.ios.ts b/ui/frame/frame.ios.ts index e918b069c..5dcafe7c2 100644 --- a/ui/frame/frame.ios.ts +++ b/ui/frame/frame.ios.ts @@ -265,7 +265,7 @@ class UINavigationControllerImpl extends UINavigationController implements UINav let owner = this._owner.get(); if (owner) { owner.onLoaded(); - } + } } public viewDidLayoutSubviews(): void { @@ -273,7 +273,7 @@ class UINavigationControllerImpl extends UINavigationController implements UINav if (owner) { trace.write(this._owner + " viewDidLayoutSubviews, isLoaded = " + owner.isLoaded, trace.categories.ViewHierarchy); owner._updateLayout(); - } + } } public navigationControllerWillShowViewControllerAnimated(navigationController: UINavigationController, viewController: UIViewController, animated: boolean): void { diff --git a/ui/list-view/list-view.ios.ts b/ui/list-view/list-view.ios.ts index 968c285ca..a451d3765 100644 --- a/ui/list-view/list-view.ios.ts +++ b/ui/list-view/list-view.ios.ts @@ -160,6 +160,15 @@ class UITableViewRowHeightDelegateImpl extends NSObject implements UITableViewDe cell.highlighted = false; return indexPath; } + + public tableViewHeightForRowAtIndexPath(tableView: UITableView, indexPath: NSIndexPath): number { + let owner = this._owner.get(); + if (!owner) { + return DEFAULT_HEIGHT; + } + + return owner.rowHeight; + } } function onSeparatorColorPropertyChanged(data: dependencyObservable.PropertyChangeData) {