[TIMOB-24352] iOS: Add MaskedImage, BlurView, LivePhotoView and and ButtonBar API's to ListView template types
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-04-04T21:51:01.000+0000 |
Affected Version/s | Release 6.0.1 |
Fix Version/s | Release 6.1.0 |
Components | iOS |
Labels | ios, listview, maskedimage, template |
Reporter | Mathias Eklöf |
Assignee | Hans Knöchel |
Created | 2017-01-28T15:45:01.000+0000 |
Updated | 2017-05-10T04:15:10.000+0000 |
Description
All of a sudden, I can't use MaskedImages inside a ListView template.
This has never been an issue earlier. This happened from no where. It works perfectly fine in the Simulator, but not when I build to the device.
It's super easy to replicate, just create a listview, put a template item which uses a MaskedImage.
var spaceTemplate = function() {
return {
properties: {
backgroundColor: "transparent",
selectionStyle: Ti.UI.iOS.ListViewCellSelectionStyle.NONE,
height: 10
},
childTemplates: [{
type: 'Ti.UI.MaskedImage',
properties: {
width: 20,
height: 20,
tint: '#FFFFFF',
image: "/path-to-image.png"
}
}]
};
};
*EDIT* by [~hansknoechel]: Changing ticket to also include other API's that are not available for ListView templates so far.
Hey Mathias, thanks for the ticket! I can think of what's wrong there, but do you know un which version this worked? This ticket might be a good candidate for 6.0.2 as well :-). *EDIT*: Looking at [this snippet](https://github.com/appcelerator/titanium_mobile/blob/6_0_X/iphone/cli/commands/_build.js#L6013-L6026), I'm wondering how this could ever have worked. Those lines describe the valid ListItem template types. It would be OK to add
USE_TI_UIMASKEDIMAGE
to that list, but that would be an improvement. If this worked in 5.5.x or 6.0.0, I'll check again.It has worked with all previous versions. I had this struggle previously with ScrollableView inside a listview, which all of a sudden stopped to work. But that "bug" was fixed a couple of versions ago. This occurs for me now with 6.0.1. I cant explain, but as I said, the exact thin happened earlier with scrollableview. Everything is fine in the simulator, as alwasy!
It was the same for the ScrollableView: It was not defined, so it was added. The "workaround" would be to use any Ti.UI.MaskedImage somewhere else. And I'm really sure that it did not work before, I diff'd the changes for that file back to 2015 (5.0.0.GA). Supporting it is no problem, but it's an improvement rather than a bug in that case.
I understand! So is it possible to add it in the next release of the GA?
We can include it for 6.1.0 and also look out for other possible UI elements that could be considered in item templates. 6.0.2 would only match if it would be a regression for 6.0.0 / 6.0.1
Okey, when do you think 6.1.0 will be GA released?
No final date so far, probably march. But you can patch your SDK today, just replace the above lines with
in your SDK (~/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/iphone/cli/commands/_build.js).
Cool, thanks!
PR: https://github.com/appcelerator/titanium_mobile/pull/8803 (Test-Case coming)
[~hansknoechel] Test case ?
Basically any list-view template with the above elements as a child-template. I'll come up with something today then.
Test-case (to be built to device from the packaged SDK):
Expected behavior: https://abload.de/img/simulatorscreenshot31chr92.png
FR passed, using: MacOS 10.12 (16A323) Studio 4.8.1.201612050850 Ti SDK 6.1.0 Appc NPM 4.2.8 Appc CLI 6.1.0 Alloy 1.9.5 Xcode 8.3 (8E162) Tested using the provided test case as well as another case which included a ListView using each of the added templates
Verified this fix is in 6.2.0.v20170426052901 but not the 6_1_X branch. Can there be a backport or a revision of the fix version, [~hansknoechel]?
PR (6_1_X): https://github.com/appcelerator/titanium_mobile/pull/9043
Verified fix in in the 6.2.0 SDK mentioned above and in 6.1.0.v20170509170935.