[AC-2343] iPhone5 & iPad : can't access Default Splash Screen resources from MainBundle
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-04-05T23:21:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | API, Titanium, default.png, i0S |
Reporter | Vincent |
Assignee | Shak Hossain |
Created | 2012-11-10T10:46:00.000+0000 |
Updated | 2016-03-08T07:41:22.000+0000 |
Description
if you want to load the Default png from the MainBundle, for example to use as a background for one of your window /view this will work only for 3.5 inches iPhones not for iPhone 5 and iPad.
in TiUtils.m :
+(UIImage*)loadBackgroundImage:(id)image forProxy:(TiProxy*)proxy
we have the special case
( around line 1632)
if (resultImage==nil && ( [image isEqualToString:@"Default.png"] ))
{
// special case where we're asking for Default.png and it's in Bundle not path
resultImage = [UIImage imageNamed:image];
}
which will work only for legacy iPhones.
same special case in
UIModule.m
(around line 192)
-(void)setBackgroundImage:(id)image
my solution was to rewrite the special case like this ,in both methods (dirty)
if (resultImage==nil && ([image isEqualToString:@"Default.png"]||[image hasPrefix:@"Default-"]))
{
// special case where we're asking for Default.png and it's in Bundle not path
resultImage = [UIImage imageNamed:image];
}
Hi Vincent, It has been long since the ticket was last updated. We have not heard back from you further. Can you please let me know if this is still an issue for iPhone 5 and iPad. If so, please post a complete test case and we will review at the earliest. If we don't hear back from you, we will assume the issue is invalid and close the ticket. Thanks,