Skip to content

Commit

Permalink
feat: support using OptionBar
Browse files Browse the repository at this point in the history
Closes ALOY-1746
  • Loading branch information
ewanharris committed Mar 3, 2021
1 parent 51284cc commit 93c2df1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ exports.parse = function(node, state) {
parents: [
'Ti.UI.ButtonBar',
'Ti.UI.iOS.TabbedBar',
'Ti.UI.OptionBar',
'Ti.UI.TabbedBar'
],
children: [
Expand Down
12 changes: 12 additions & 0 deletions Alloy/commands/compile/parsers/Ti.UI.OptionBar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const _ = require('lodash');
const tiapp = require('../../../tiapp');
const U = require('../../../utils');
const MIN_VERSION = '10.0.0';

exports.parse = function(node, state) {
const tiappSdkVersion = tiapp.getSdkVersion();
if (tiapp.version.lt(tiappSdkVersion, MIN_VERSION)) {
U.die(`Ti.UI.OptionBar requires Titanium SDK ${MIN_VERSION}+`);
}
return require('./Ti.UI.ButtonBar').parse(node, state);
};

0 comments on commit 93c2df1

Please sign in to comment.