mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 03:01:51 +08:00
iOS Frame, Page and TabView measure/layout methods removed. We now rely on the framework positioning. This will result in a change that width, height, minWidth, minHeight, margins not respected on these controls
iOS layout positioning now respects native properties like automaticallyAdjustsScrollViewInsets, edgesForExtendedLayout, extendedLayoutIncludesOpaqueBars, navigationBar.translucent, tabBar.translucent Removed frame-tests.ios.ts - those tests are now invalid Added new layout tests inside page-tests.ios.ts Commented few asserts in scroll-view-tests View now expose ios namespace with layoutView method and UILayoutViewController used by page, tab-view and application module ViewBase now expose viewController property that should be set from all widgets that are using viewcontrollers internally (like Page, Frame, TabView) ViewBase now sets ios property to either the view returned from createNativeView or to nativeViewProptected fragment.transitions now use animation/transition start to add fragments to waitingQueue. Before we did it manually in navigate/goBack. This way we can reuse the fragment.transition when calling showDialog. Also when animation/transition ends we check the animation/transition to see if this fragment should be set as current. Frame expose new loadViewFromEntry method (to load a view from URI) Frame navigation happens once frame is loaded Frame now supports Page as a child in XML Fixed GridLayout row, rowSpan, column, columnSpan properties type Fixed bug in GridLayout where add/remove of columns/rows won't update the internal state of the grid (backport from android when GridLayout is recycled) ListView will no longer invalidate layout when cell is removed Fixed bug in ScrollView ios where effectiveMinWidth/Height was multiplied to density (it is already on device pixels so no need to multiply) TabView android now calls loaded only on the selected child (not all) Core refactoring
This commit is contained in:
@ -39,12 +39,12 @@ function _createListView(): ListView {
|
||||
var button = <Button>args.view;
|
||||
if (!button) {
|
||||
button = new Button();
|
||||
button.on(Button.tapEvent, _clickHandlerFactory(args.index));
|
||||
args.view = button;
|
||||
}
|
||||
|
||||
button.text = "Button" + args.index;
|
||||
button.id = button.text;
|
||||
button.on(Button.tapEvent, _clickHandlerFactory(args.index));
|
||||
});
|
||||
|
||||
listView.items = items;
|
||||
@ -246,6 +246,9 @@ function _clickTheFirstButtonInTheListViewNatively(tabView: TabView) {
|
||||
button.performClick();
|
||||
}
|
||||
else {
|
||||
(<UIButton>(<UITableView>tabView.ios.viewControllers[0].view.subviews[0]).cellForRowAtIndexPath(NSIndexPath.indexPathForItemInSection(0, 0)).contentView.subviews[0]).sendActionsForControlEvents(UIControlEvents.TouchUpInside);
|
||||
const tableView = <UITableView>tabView.ios.viewControllers[0].view;
|
||||
const cell = <UITableViewCell>tableView.cellForRowAtIndexPath(NSIndexPath.indexPathForItemInSection(0, 0));
|
||||
const btn = <UIButton>cell.contentView.subviews[0];
|
||||
btn.sendActionsForControlEvents(UIControlEvents.TouchUpInside);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user