Menu

Best strategy for supporting iPhone, iPhone5 and iPad

Kaarigar
2013-08-31
2013-08-31
  • Kaarigar

    Kaarigar - 2013-08-31

    When I used FM controls, I used Form inheritance to support different devices, control sizes and their placements for different devices. Just want to ask what you guys are doing to accomplish the sam ewith DPF controls. Would the same old strategy as FM works or there is any better or recommended way of doing it? I would really welcome your inputs and suggestions.

    Thanks You!

     
  • Fenistil

    Fenistil - 2013-08-31

    Because my app should display differently on iPhone and iPad, and later on Android, I decided to separate the business logic from the UI totally, and use different forms for different devices. So I have some unit with only objects in them. These units contains the "engine" of my app, the database modules, and every universal function that I need. In addition I have forms and frames for the UI. I make every Form or Frame has the "_iPhone" or "_iPad" tag in their name, so I can choose either in design (with compiler directives) or in runtime which to use. This way I can assign either universal event handlers or make a separate one for each platform. So the same button can be different in size, position, caption and everything on iPhone and iPad, but do the same (Same event handler, separate forms). Or can do differently thing (for example load more data to a TableView because of the extra space on iPad). The separate business logic takes care of the database, saving, loading, calculations, and everything else.

    But if I would like to has the same appearance on iPhone and iPad just in different size, maybe I would try to create universal forms using Align and Anchors. But I think this approach is only good for full-screen games. In normal apps I think its better to use the extra space for something.

    But I recommend to always separate the business logic from the UI because if you would like to compile your program later for other platforms, it is the easiest way.

    Greetings

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.