Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10346] iOS: Implement applyProperties({}) method on Ti.UI objects to take a list of json properties as is done at create time.

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-07-22T07:01:32.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sSprint 2012-16 API, Release 3.0.0
ComponentsiOS
Labelsapi, module_button, qe-testadded
ReporterRussell McMahon
AssigneeBlain Hamon
Created2012-08-08T11:47:07.000+0000
Updated2013-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);

Comments

  1. Vishal Duggal 2012-08-09

    Isn't this already supported through the updateLayout call??
  2. Sabil Rahim 2012-08-09

    FR & CR
  3. Evgenii Tcarev 2012-08-10

    Verified fixed with: Titanium Studio, build: 2.1.1.201207271312 Titanium SDK, build: 2.2.0.v20120810080115 Device: iPhone 4s (5.1.1)
  4. Ping Wang 2012-08-15

    PR https://github.com/appcelerator/titanium_mobile/pull/2701
  5. Priya Agarwal 2013-07-22

    Reopening just to update label.
  6. Priya Agarwal 2013-07-22

    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.
  7. Priya Agarwal 2013-07-22

    Reopening to update label.
  8. Priya Agarwal 2013-07-22

    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

JSON Source