Anders' Analog Clock app ported to Delphi for iOS

Posted by on in Blogs
My FireMonkey Clock app has been ported using a beta version of Delphi for iOS.

[caption id="attachment_39423" align="alignnone" width="225" caption=" "]Main tab[/caption]

Above you can see a screen shot of the app as it starts up. By default it uses "normal drive" - the second hand moves once per second and the minute hand moves once per minute.

The app is a Universal app (supports iPhone and iPad). The main clock screen uses a TScaledLayout to ensure proper scaling down to the iPhone (the app was designed for the iPad).

If you hit the Info button it will take you to the setup tab, where you can select "Flame" (or FireMonkey second hand) as well as "Smooth drive" - the second and minute hands move smoothly.

[caption id="attachment_39422" align="alignnone" width="225" caption=" "]Setup tab[/caption]

The setup screen uses a combination of items that scale and items that don't scale. For instance, the toolbar, the back button, and the listbox with its items are not supposed to scale, but still be aligned properly. The clock faces, however, do scale inside of a TScaledLayout.

[caption id="attachment_39425" align="alignnone" width="225" caption=" "]FireMonkey second hand[/caption]

Above you can see what the FireMonkey second hand looks like.

Below is a screen shot of my Structure Pane where you can see how I designed the app:

[caption id="attachment_39424" align="alignnone" width="127" caption=" "]Structure View[/caption]

I also wanted to mention performance. The previous version of the app was created in XE2 where I got about 2-3 frames per second in smooth mode - not very smooth. However, this version created with our upcoming product gets a blazing 60 frames per second on the iPad 3 using iOS 6.1.3 and almost the same fps rate on iPhone 4 (iOS 5.1) and iPad 2 (iOS 6.1) at about 55+ frames per second.

Enjoy!

PS: The screen shots above are actually from the *next* update I will be pushing soon... The current one looks almost the same, except for a few changes in layout.


Comments

  • Guest
    Joseph Friday, 22 March 2013

    >The previous version of the app was created in XE2 where I got about 2-3
    >frames per second in smooth mode - not every smooth. However, this
    >version created with our upcoming product gets a blazing 60 frames per
    >second....

    So people who bought XE2 got a beta version of a product, no apologies, and by breaking the product out into a separate SKU now they won't get the new version that actually works via SA either?

  • Guest
    Anders Ohlsson Friday, 22 March 2013

    I can't comment on SKUs, who gets what, and such at this time. The only public information so far is what's in the public Mobile Roadmap.

  • Guest
    Nikolaj Saturday, 23 March 2013

    Great to hear about the performance increases.
    Performance is king!

  • Guest
    bwilt Sunday, 24 March 2013

    Tried to comment the other day but not sure if it got entered.

    Can you explain how you estimate the FPS rates ?

    Could you also please comment on how the software is going to be released, is it Delphi IOS, then at some point C++ IOS, and then Android for Delphi / C++ ?

    Got to say I'm still very disillusioned in regard to all of the FM2 and IOS after buying XE2 and then having that all dumped in the midst of trying to develop with it. At best I think you would call it Alpha software.

  • Guest
    Anders Ohlsson Sunday, 24 March 2013

    @bwilt: FPS rates on the updated app was measured by counting the frames for every smooth "tick" in my update timer. I then displayed that frame counter on a label every second. This code was removed before release of course, as it was "debug" code if you will. For the XE2 version, since it's much slower, I simply counted every step around the dial and figured out the frame rate manually.

    I can't comment on exact naming and such, or even exact order, all I can say is that the upcoming release will have Delphi support for iOS. C++ and Android are coming. I can't (at this time) tell you if Delphi for Android is coming before C++ for iOS, etc. All that is public at this time is the mobile roadmap.

  • Guest
    Dev{eloper} Stonez Sunday, 24 March 2013

    I played with both versions of the app and I have to confess that the new one (XE 3/5/4.0 driven) is definitely better ...

    Anyhow, what I observed is that the rendering has some non-aliasing issues/artifacts for hands.
    Additionally I'm just wondering how this small application resulted in being so fat (as of 17 Mb !). Is it a debug version or maybe you included some non necessary resources in plist ? Or the images are not optimized ?
    .... Or it just ended-up by fully including (not-smart linking !) the FMX for iOS with all the attached RTTI (unused, again) ???

  • Guest
    Anders Ohlsson Tuesday, 26 March 2013

    @Stonez: I've noticed the non-aliasing of the rectangles too. I have to log that one. I have to look into the size of the app - thanks for the additional info you provided today.

  • Guest
    Anders Ohlsson Tuesday, 26 March 2013

    @Stonez: Got it down to 22MB uncompressed (from 26MB) by cleaning out some extraneous resources as discussed earlier. My bitmaps were added both as resources as well as files during development (and beta cycle). Still investigating the rest.

  • Guest
    Anders Ohlsson Tuesday, 26 March 2013

    @Stonez: Ripped another dupe out. My background is also my splash screen. Now loading from the file instead. Down to 9MB compressed and 20MB uncompressed. 47% savings in air traffic and 23% on device savings. Good lesson in cleaning up my binaries... Hehe. Still looking into the rest though - but that's others internally. ;)

  • Guest
    Anders Ohlsson Tuesday, 26 March 2013

    Update submitted. Should see in about a week. :)

  • Guest
    bwilt Thursday, 28 March 2013

    Did you manage to reduce the size any further from 20MB with reducing RTTI for this release ?

  • Guest
    Anders Ohlsson Thursday, 28 March 2013

    @bwilt: not yet, but the new update should be out momentarily. It just processed for AppStore. A new record for me - 2 days in the review queue. :)

  • Guest
    bwilt Friday, 29 March 2013

    Hey Anders,
    Will take a look when it gets released. Do you think there will be some further reduction in size of both FM & VCL exe's in the next release, I'm thinking of both IOS and general apps ? Allot of question in regard to the Trivia app in this thread https://forums.embarcadero.com/thread.jspa?messageID=548130#548130. Was also reading this suggestion http://qc.embarcadero.com/wc/qcmain.aspx?d=103317, again from the thread. Any thoughts on those ?

  • Guest
    Refugio Kimberly Tuesday, 2 July 2013

    Farm Heroes Saga Hack Tool is here http://breakgames.eu/farm-heroes-saga-hack/" title="BreakGames.eu" rel="nofollow">Click!

  • Please login first in order for you to submit comments
  • Page :
  • 1

Check out more tips and tricks in this development video: