Skip to content

Commit

Permalink
ios9 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Enchev committed Oct 6, 2015
1 parent 27e9118 commit 6a17651
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions apps/tests/ui/list-view/list-view-tests.ts
Expand Up @@ -686,10 +686,10 @@ function getTextFromNativeElementAt(listView: listViewModule.ListView, index: nu
return (<android.widget.TextView>nativeElement).getText() + "";
}
else if (listView.ios) {
if (utils.ios.MajorVersion <= 8) {
if (types.isFunction(listView.ios.visibleCells)) {
return listView.ios.visibleCells()[index].contentView.subviews[0].text + "";
}
else if (utils.ios.MajorVersion > 8) {
else {
return listView.ios.visibleCells[index].contentView.subviews[0].text + "";
}
}
Expand All @@ -700,10 +700,10 @@ function getNativeViewCount(listView: listViewModule.ListView): number {
return listView.android.getChildCount();
}
else if (listView.ios) {
if (utils.ios.MajorVersion <= 8) {
if (types.isFunction(listView.ios.visibleCells)) {
return listView.ios.visibleCells().count;
}
else if (utils.ios.MajorVersion > 8) {
else {
return (<any>listView.ios.visibleCells).count;
}
}
Expand Down
8 changes: 4 additions & 4 deletions ui/tab-view/tab-view.ios.ts
Expand Up @@ -82,10 +82,10 @@ export class TabViewItem extends common.TabViewItem {
var icon = this._parent._getIcon(this.iconSource);
var tabBarItem = UITabBarItem.alloc().initWithTitleImageTag((this.title || ""), icon, this._parent.items.indexOf(this));
if (!icon) {
if (utils.ios.MajorVersion <= 8) {
if (types.isFunction(tabBarItem.setTitlePositionAdjustment)) {
tabBarItem.setTitlePositionAdjustment({ horizontal: 0, vertical: -20 });
}
else if (utils.ios.MajorVersion > 8) {
else {
(<any>tabBarItem).titlePositionAdjustment = { horizontal: 0, vertical: -20 };
}
}
Expand Down Expand Up @@ -189,10 +189,10 @@ export class TabView extends common.TabView {

var tabBarItem = UITabBarItem.alloc().initWithTitleImageTag((item.title || ""), icon, i);
if (!icon) {
if (utils.ios.MajorVersion <= 8) {
if (types.isFunction(tabBarItem.setTitlePositionAdjustment)) {
tabBarItem.setTitlePositionAdjustment({ horizontal: 0, vertical: -20 });
}
else if (utils.ios.MajorVersion > 8) {
else {
(<any>tabBarItem).titlePositionAdjustment = { horizontal: 0, vertical: -20 };
}
}
Expand Down

0 comments on commit 6a17651

Please sign in to comment.