[TIMOB-10346] iOS: Implement applyProperties({}) method on Ti.UI objects to take a list of json properties as is done at create time.
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-07-22T07:01:32.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Sprint 2012-16 API, Release 3.0.0 |
Components | iOS |
Labels | api, module_button, qe-testadded |
Reporter | Russell McMahon |
Assignee | Blain Hamon |
Created | 2012-08-08T11:47:07.000+0000 |
Updated | 2013-07-22T07:01:32.000+0000 |
Description
var win = Titanium.UI.createWindow({backgroundColor:'white'});
win.open();
var btn = Ti.UI.createButton({left:10, top:10, width:100, height:40, title:'Tap Me!'});
btn.addEventListener('click',function(e){
btn.applyProperties({width:200,height:100,title:'I Was Tapped!'});
});
win.add(btn);
Isn't this already supported through the updateLayout call??
FR & CR
Verified fixed with: Titanium Studio, build: 2.1.1.201207271312 Titanium SDK, build: 2.2.0.v20120810080115 Device: iPhone 4s (5.1.1)
PR https://github.com/appcelerator/titanium_mobile/pull/2701
Reopening just to update label.
Closing as fixed. Verified with Environment: Studio: 3.1.2.201307161852 Titanium SDK: 3.1.2.v20130718094558 acs:1.0.3 alloy:1.1.3 npm:1.2.14 titanium:3.1.1 titanium-code-processor:1.0.1 OS: OSX 10.8 Device:iPhone Simulator(v6.0) ,iphone5(v6.1.4),nexus 7(v4.1) Xcode: 4.5.1 applyProperties working fine.
Reopening to update label.
Updated label and verified. Studio: 3.1.2.201307161852 Titanium SDK: 3.1.2.v20130718094558 acs:1.0.3 alloy:1.1.3 npm:1.2.14 titanium:3.1.1 titanium-code-processor:1.0.1 OS: OSX 10.8 Device:iPhone Simulator(v6.0) ,iphone5(v6.1.4),nexus 7(v4.1) Xcode: 4.5.1