-
Notifications
You must be signed in to change notification settings - Fork 12
FAQ
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...)
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.
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.
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).