[TIMOB-10583] iOS: 'invalid context 0x0' error when setting the 'backgroundRepeat: true' property in a view
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-03-27T08:56:33.000+0000 |
Affected Version/s | Release 2.1.1 |
Fix Version/s | 2013 Sprint 07 |
Components | iOS |
Labels | api |
Reporter | Federico Casali |
Assignee | Shameer Jan |
Created | 2012-08-23T16:50:34.000+0000 |
Updated | 2017-03-28T17:22:55.000+0000 |
Description
Problem description
'Sample code
var win = Ti.UI.createWindow({
backgroundColor:'black'
});
var row = Ti.UI.createTableViewRow({height: 94, className: "standardRow"});
var rightView = Ti.UI.createView({
backgroundImage: "LightGrayBackground.png",
width: 205,
left: 115,
height: 94,
top: 0,
backgroundRepeat: true
});
row.add(rightView);
var tableView = Ti.UI.createTableView({
backgroundColor:'black',
data: [row]
});
win.add(tableView);
win.open();
- Run the sample code and check the log.
Result: Attachments
File | Date | Size |
---|---|---|
LightGrayBackground.png | 2012-08-23T16:50:34.000+0000 | 1088 |
LightGrayBackground@2x.png | 2012-08-23T16:50:34.000+0000 | 1414 |
This issue happens also if view is not added to table view row. I don't have test case right now, but can make one if necessary.
Setting the view/window background to tile after the view has propagated/is visible solves this problem. Possibly delaying the tiling until the view is loaded will be a plausible fix.
Issue does not reproduces with the release 3.1.0 Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 iOS iPhone Simulator: iOS SDK version: 6.0
Issue still exists, tested with SDK 3.0.2. Workaround with using "postlayout" event can be found here: [http://developer.appcelerator.com/question/147793/error---cgcontextdrawtiledimage-invalid-context-0x0] Would be nice if problem could be solved without workaround.
Can verify this ticket as "Cannot Reproduce". The error no longer shows up in the console log in Studio. Tested with the following environment; iPhone 7 (10.2) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.3 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80