{ "id": "107247", "key": "TIMOB-13476", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "15400", "description": "2013 Sprint 08 API", "name": "2013 Sprint 08 API", "archived": true, "released": true, "releaseDate": "2013-04-22" }, { "id": "15106", "description": "2013 Sprint 08", "name": "2013 Sprint 08", "archived": true, "released": true, "releaseDate": "2013-04-22" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-04-11T20:53:40.000+0000", "created": "2013-01-02T11:27:43.000+0000", "priority": null, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2013-10-25T18:31:15.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Since this commit: https://github.com/vishalduggal/titanium_mobile/commit/a5b7828d980a36d298cb48ecba79971426f6a162\r\n\r\nThe resize of background image for button has changed on iOS 5. It does not resize the center by stretching but by tiling it.\r\n\r\nLooking at the commit there should be a test for uisGreater than 5 but only for the respondToSelector which follows.", "attachment": [], "flagged": false, "summary": "iOS 5: Image resize broken", "creator": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "environment": "Titanium 3.1.0 master", "comment": { "comments": [ { "id": "246047", "author": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "body": "Can you post a sample code? Which version(s) of the SDK do work for you, and which ones don't?", "updateAuthor": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-04-05T20:51:26.000+0000", "updated": "2013-04-05T20:51:26.000+0000" }, { "id": "246130", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "it s been fixed:\r\nhttps://github.com/vishalduggal/titanium_mobile/commit/5d8a5edcb48aba8ed2580bfb4edc5b850f980ebc\r\nBut if I may it s 2 \"if\" when only one was necessary\r\nJust test for the method and not ios5 and you are good", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2013-04-06T07:39:40.000+0000", "updated": "2013-04-06T08:31:09.000+0000" }, { "id": "246176", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Resolved as fixed.. I doubt we'll have time to change if statements for the sake of cleanliness, as long as it works.\r\n\r\nNot sure what you meant by \"Just test for the method and not ios5 and you are good\".", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-06T19:45:01.000+0000", "updated": "2013-04-06T19:45:01.000+0000" }, { "id": "246234", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "I get it s not a priority and i did it in my branch, so i am good ;)\n\nIn the code we have 2 nested if case\n{code}\nif ([TiUtils isIOS5OrGreater]) {\n...\n if ([theImage respondsToSelector:@selector(resizableImageWithCapInsets:resizingMode:)]) {\n ...\n stretchableImage = [[theImage resizableImageWithCapInsets:UIEdgeInsetsMake(top, left, bottom, right) resizingMode:1] retain];\n }\n else {\n ...\n stretchableImage = [[theImage resizableImageWithCapInsets:UIEdgeInsetsMake(top, left, bottom, right)] retain];\n }\n}\nelse {\n...\nstretchableImage = [[theImage resizableImageWithCapInsets:UIEdgeInsetsMake(top, left, bottom, right)] retain];\n}\n...\n{code}\n\nThere s redondancy\n\nyou can simply do it that way\n\n{code}\nif ([theImage respondsToSelector:@selector(resizableImageWithCapInsets:resizingMode:)]) {\n ...\n stretchableImage = [[theImage resizableImageWithCapInsets:UIEdgeInsetsMake(top, left, bottom, right) resizingMode:1] retain];\n}\nelse {\n ...\n stretchableImage = [[theImage resizableImageWithCapInsets:UIEdgeInsetsMake(top, left, bottom, right)] retain];\n}\n...\n{code}", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2013-04-07T08:35:22.000+0000", "updated": "2013-04-07T08:35:22.000+0000" }, { "id": "247157", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "This is the inner if condition right now with all the calculation in the outer if loop. \n{code}\n if ([theImage respondsToSelector:@selector(resizableImageWithCapInsets:resizingMode:)]) {\n //1 = UIImageResizingModeStretch\n stretchableImage = [[theImage resizableImageWithCapInsets:UIEdgeInsetsMake(top, left, bottom, right) resizingMode:1] retain];\n }\n else {\n stretchableImage = [[theImage resizableImageWithCapInsets:UIEdgeInsetsMake(top, left, bottom, right)] retain];\n }\n\n{code}\n", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-04-11T20:53:16.000+0000", "updated": "2013-04-11T20:53:16.000+0000" }, { "id": "247244", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "Yes Vishal but you dont need the ios5 test on top of it", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2013-04-12T06:26:46.000+0000", "updated": "2013-04-12T06:26:46.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }