Time flies by,but we can capture it

Time flies by, but we can capture it.

TimeCapturor

timecapturor

It’s my first App released in App Store. Basically, I got this idea from the observation of my friends. Like every Chiristmas Day, they alsways say ‘ Time goes so fast, I even dont know what happend in the last year!’ So I wander can I create an App that can capture people’s valuble moments or just daily life?

Finally, I got this idea. We can generate a time-lapse video from photos. In this way, users can have a glance of what happened in the past period. Just like this video.

This is my first time using Swift, so I start to learn this coding language by watching a Tuition Video from Stanford University in iTunes U. Then designed the UI of this App. The last step is implementation. There are so many tiny problem during coding, but the most challenge one is Memory Management problem.

When I was tring to generate a video from 10 photos, it worked good, but when I want to generat video from more than 50 photos, the memory increase sharply and used up very quickly then the thread was terminated by system.

After googling, I figured out what caused the memory increasing.

1
We need to use autorelease pool here.

The iPhone programming environment does not support garbage collection. You must pay attention to objects you create (and therefore own) and must consequently make sure that you properly relinquish ownership. This permits objects to be deleted from memory correctly.

When you develop for the iPhone (or iPad), you use Apple’s Cocoa Touch framework and you write code with Objective-C. Cocoa Touch supports a Model-View-Controller design and maintains (for you) an Autorelease Pool that temporarily holds objects in memory for later release. So, while it’s true that the iPhone environment does not support automatic garbage collection, the environment does provide some automatic memory management assistance. Understanding how the Autorelease Pool works is essential to fully understanding memory management in Objective-C and the Cocoa Touch environment.

iPhone applications run in an event loop, as shown in the diagram below. That is, when your iPhone application launches, the program enters the event loop and waits for a user touch event. When a touch event happens, the Cocoa Touch framework detects the event, creates an event object, and allocates and initializes an autorelease pool. Cocoa Touch then invokes your application event handler, making the event object available.

digram

When reading images to memory, I put the process in a loop, so we need to release the used memory before allocate new memory.

After completed this project, I released it to App Store for free!

You can download HERE or scan QR code below.

qr

It’s a beautiful Application, there are some tips for using.

  • With TimeCapturor, you can capture the moments you treasure,the places you been,the people you love.
  • Generating a time-lapse with just one click, Gif or video as you wish.
  • Share the time you captured with your friends. Strong social media sharing supported.
  • Besides, TimeCapturor record the every step and progress that you made when you are on the way recording your time.
  • Don’t forget to set a daily reminder.

Below are some screen shots of TimeCapturor.

写得好!朕重重有赏!