Skip to content
This repository has been archived by the owner on Jul 14, 2020. It is now read-only.
Jonathan Ellis edited this page Nov 25, 2013 · 7 revisions

Can Pegasus be used to build cross-platform UIs?

Currently, no. However, using relative positioning and sizing you can build single UIs that work on both iPad and iPhone.

(A runtime package for Android will be considered once Pegasus for iOS is relatively stable... There are major technical challenges with bringing Pegasus to Android which would likely result in a major format change in the XML which would break a lot of existing layouts...)

Does Pegasus provide the UI in native code?

Yes! Unlike some other libraries that let you design your UI in markup, Pegasus simply acts as a bridge to convert your XML to fully native UIKit views at runtime.

Is Pegasus slow at runtime?

Pegasus would be very slightly slower at drawing the actual view because it has to parse the XML and perform any necessary calculations before it can construct the view hierarchy. This is not noticeable in real-world applications unless perhaps if you start building views with hundreds or thousands of subviews (in which case it would be slow in native code anyway).

Once the view hierarchy has been loaded, all views are fully native, and so the app runs at full speed.

Is Pegasus written for ARC?

Yes, Pegasus is written for ARC (Automatic Reference Counting) which eliminates the need for manual retaining and releasing of objects. You should only use Pegasus in ARC-enabled projects otherwise you're project is going to be full of leaks (by now you should be migrating your apps to ARC anyway).