Project: titanium
Issue TIMOB-20567: Hyperloop: Allow class usage with only the framework being required
Currently, when we want to use a {{UILabel}} with Hyperloop, we need to require it the following way: *iOS*: {code:javascript} var UILabel = require("UIKit/UILabel"); {code} Now if we want to use another class from the {{UIKit}} framework e.g. {{UIView}}, we need to do: {code:javascript} var UIView = require("UIKit/UIView"); {code} The approach is to make it possible to require frameworks like we do it in Swift/Objective-C and expose the available classes automatically: {code:javascript} require("UIKit"); // Can we do this require-statement anonymously? var view = new UIView(); var label = new UILabel(); {code} In addition, Alloy does a similar kind of pre-processing to expose variables like {{OS_IOS}} and {{arguments}} in new controllers.
Story points: 8