uchicago-mobi / 2016-Winter-Forum

Class Forum for MPCS51030.
3 stars 0 forks source link

png to PNG #230

Closed hbennett766 closed 8 years ago

hbennett766 commented 8 years ago

The project I commit to github has correct image file names, but every time I download the zip, the same set of png images gets converted to PNG, and it throws warnings/doesn't load the images. I've tried replacing, re-uploading, changing the extension, etc. Any suggestions?

susanstevens commented 8 years ago

@hbennett766 Strange! I have no idea why Github would do that.

Several questions:

The other thing I'm wondering is why Xcode would care if your file extension is .png or .PNG, since you can use either. You shouldn't have to specify the extension anywhere in your code. If an image file named "cat.png" or "cat.PNG" lives in Assets.xcassets under the name "cat", you can just do myImageView.image = UIImage(named: "cat").

Last resort, zip up your image files and email them to Dana, Andrew and me.

hbennett766 commented 8 years ago

They're in the assets folder (background.imageset), and they download just fine with everything else from GitHub. Yes, I can open the images, they open by default in Preview, and as soon as I change the extension from .PNG to .png in assetsxcassets -> background.imageset, the warnings go away and the images load. I just shouldn't have to do that every time... And exactly! I'm not sure why it keeps changing itself, and also why it cares, because thats how I'm calling the background image.