Why my iPhone camera roll take so much storage?

I have a iPhone 6 and ~100 photos in it, but when I check out the storage usage, it says my camera roll takes 8 Gb storage… That is insane… Also there’s nothing in Recently Deleted folder.

After googling, I figured it out it was a bug of iOS. The solution is:

  1. Go to Settings
  2. Date & Time
  3. Untoggle “Set Automatically”
  4. Manually change the date back. For example, if today is March 15, 2015, choose August 1, 2014. (You can change it back once we’re done)
  5. Close out of that
  6. Open “Photos” (Make sure you have terminated this App before relaunching it)
  7. Select “Albums”
  8. If, like me, you had already cleared out everything from the Camera Roll and “Recently Deleted” folder, you’ll smile to see that your “Recently Deleted” folder now has thousands of images back. Those are your phantom photos
  9. Open it, “Select” and start deleting
  10. Now, go back into Settings – General – Usage – Storage – Manage Storage – and you’ll notice your Photo & Camera is empty if you deleted everything

via Apple forum here.

UIWebView: YouTube video got shifted down a little bit after resizing

Have you met this? When you embed your YouTube video in your iOS App, it should look like this:

before

The blue area is the other part of your app. You are using YouTube iframe API to show your clip in a perfect size.

However, if you need to resize it smaller, you may get the following result:

after

The red part indicates the original size of your UIWebView. You’ll see there is an ugly black rectangle at the top of the video. Yes, the whole YouTube video player has got moved down.

I have researched for a whole day to figure out why it happens and how to prevent it, and finally I have got something and a work around.

It should be an iOS UIWebView issue, or in detail, it is an issue of the iOS UIKit controls who contains a CALayer.  If you are using some customized UIView as your OpenGLView, it could happen as well. However, I have found a work around for this issue – embed YouTube player shift issue:

Usually we use the following code to show a YouTube video in our UIWebViews in fullscreen:

<iframe id='playerId' type='text/html' width=100% height=100% src='https://www.youtube.com/embed/xxxxxx' >

height=100% would cause the problem. Try using 90% or 95% instead, you’ll find the problem has solved!

However, it isn’t solved perfectly because: a) I don’t want my video player contains a border on the top/bottom; b) The problem may come out again when the player is resized small enough.

To make a perfect work around, we can keep using our height=100% code and add the following javascript:

window.onresize = function() {
  document.getElementById('playerId').style.height = window.innerHeight;
};

Believe or not, the issue has solved perfectly!