Titanium

[MOD-2404] Ti.Barcode: iOS overlay not visible on iPhone

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2018-05-07T08:08:01.000+0000
Affected Version/sn/a
Fix Version/sRelease 7.2.0, Ti.Barcode 1.10.2
ComponentsBarcode
Labelsbarcode, overlay
ReporterMichael Gangolf
AssigneeVijay Singh
Created2018-03-11T14:40:29.000+0000
Updated2018-05-07T08:08:11.000+0000

Description

As seen in this github issue: https://github.com/appcelerator-modules/ti.barcode/issues/64 the overlay is not visible on an iPhone. Same code is working fine on Android
var Barcode = require('ti.barcode');
		Barcode.allowMenu = false;
		Barcode.allowInstructions = false;
		Barcode.displayedMessage = ' ';
		Barcode.allowRotation = true;

		var overlay = Ti.UI.createView({
			backgroundColor: 'transparent',
			top: 0,
			right: 0,
			bottom: 0,
			left: 0,
			width: Ti.UI.FILL,
			height: Ti.UI.FILL,
		});
		var lbl = Ti.UI.createLabel({
			bottom: 10,
			left: 10,
			right: 10,
			textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,
			text: "text",
			color: "#fff",
			backgroundColor: "transparent",
			touchEnabled: false
		});
		overlay.add(lbl);
		var cancelButton = Ti.UI.createButton({
			title: 'X',
			top: 0,
			right: 0,
			width: 30,
			right: 30,
			backgroundColor: "transparent",
			color: "#fff"
		});
		cancelButton.addEventListener('click', function() {
			Barcode.cancel();
		});
		overlay.add(cancelButton);

		Barcode.capture({
			animate: true,
			overlay: overlay,
			showCancel: false,
			showRectangle: true,
			keepOpen: false,
		});
		Barcode.addEventListener('success', function(e) {
			Ti.API.info('Success called with barcode: ' + e.result + " " + e.format);
		});
There is another example in the [linked ticket](https://github.com/appcelerator-modules/ti.barcode/issues/64#issuecomment-358098609). ti.barcode version: 1.10.1 ti sdk: 7.0.2.GA Device: iPod Touch

Comments

  1. Vijay Singh 2018-05-07 PR (titanium_mobile) : https://github.com/appcelerator/titanium_mobile/pull/10029 PR(ti.barcode): https://github.com/appcelerator-modules/ti.barcode/pull/66 Test Case - Mentioned in ticket. Note - This ti.barcode pr is dependent on titanium_mobile pr (simply a method exposed). So its better if we can merge titanium_mobile pr in 7.2.0. [~hknoechel] [~amukherjee] ?

JSON Source