ios - UIImage imageNamed gives nil in app A, but not apps B, C, D -
i have 4 apps. in each of them have "x" icon dismissing view controller. in 3 out of 4 apps, can fine:
uiimage *ximage = [uiimage imagenamed: @"x.png"];
but in 1 of apps, ximage nil. there no errors or warnings. tried compiling xcodebuild; no errors or warnings.
i have 4 versions of image:
24 -rw-r--r-- 1 user staff 8.8k jul 25 22:20 x.png 24 -rw-r--r-- 1 user staff 12k jul 25 22:20 x@2x.png 32 -rw-r--r-- 1 user staff 14k jul 25 22:20 x@3x.png 40 -rw-r--r-- 1 user staff 19k jul 25 22:20 x@4x.png
notice none of them have quarantine flag set.
i have run shasum on these files. each app has exact same files.
why might can fetch x.png in 3 out of 4 apps not 1?
thanks clues.
also, if i'm tired of nonsense, can use x@4x.png , ios use generate others?
there 2 possibilities not getting image:
1) when drag image project folder can forget check mark copy if needed option.
2) select image , check on property target membership checkbox selected or not.
3) check if there more 1 image having same name or not.
Comments
Post a Comment