Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1357] ADD system button presented as INFO system button

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionInvalid
Resolution Date2015-01-29T05:51:54.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsapi, ios, iphone
ReporterDaniel Kunzler
AssigneeShuo Liang
Created2015-01-26T19:42:39.000+0000
Updated2016-03-08T07:37:46.000+0000

Description

Problem

When ADD system button is added to anything other than toolbar/navbars, it appears as INFO !!! In the following test case and attached image capture, you may notice that I created two ADD buttons, one for view, the other for toolbar. Both are ' Ti.UI.iPhone.SystemButton.ADD '. The icon is clearly the INFO button! However, it is the only possible way to add system buttons to view and this feature is quite common everywhere. Against all odds, this bug may be a workaround to the other bug I reported (TIMOB-16941). But it is another separate bug for the ADD system button.

Test case


//Application Window Component Constructor
function ApplicationWindow() {
	//load component dependencies
	var FirstView = require('ui/common/FirstView');

	//create component instance
	var self = Ti.UI.createWindow({
		backgroundColor:'#ffffff'
	});

	//construct UI
	var firstView = new FirstView();
	self.add(firstView);
	
	var button1 = Titanium.UI.createButton({
		bottom : 64,
		left : 16,
		style : Ti.UI.iPhone.SystemButton.ADD,
	});
	self.add(button1);
	
	var button2 = Titanium.UI.createButton({
		systemButton : Ti.UI.iPhone.SystemButton.ADD,
	});
	var toolbar = Titanium.UI.iOS.createToolbar({
		items : [button2],
		bottom : 0,
		borderTop : true,
		borderBottom : true
	});
	self.add(toolbar);

	return self;
}

//make constructor function the public component interface
module.exports = ApplicationWindow;

Attachments

FileDateSize
iOS Simulator Screen Shot 26.01.2015 17.32.02.png2015-01-26T19:42:39.000+000024111

Comments

  1. Shuo Liang 2015-01-29

    Hi, Based on our doc, [http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.iPhone.SystemButton-property-ADD] "Use with Button.systemButton to specify an Add button. The resulting button can only be used in navigation bars and toolbars." Regards Shuo
  2. Daniel Kunzler 2015-01-29

    You're right, the correct one would be CONTACT_ADD for views. But I would suggest issuing an error or warning rather than showing a different completely icon.

JSON Source