In 6.5 we completely reengineered how form fields are represented in PSPDFKit. The biggest difference is that form elements are split into two distinct classes now,
PSPDFFormElement represented both non-UI form field data and the widget annotation which occasionally caused problems and required us to keep a hierarchy of annotations. With this change, a
PSPDFFormElement is strictly only a annotation that will be displayed on the screen while
PSPDFFormField takes over all the backend work of modifying form field states.
kids properties are no longer available because a
PSDPFFormElement no longer forms a hierarchy. You can retrieve the linked
PSPDFFormField using the
PSPDFFormField has a
annotations property that lists all annotations connected to this specific form field. For example, a
PSPDFButtonFormField can have multiple
PSPDFButtonFormElement listed in its
annotations property that form one radio button group.
Properties that only dealt with form field data, like
alternativeFieldName, have been moved to
shouldRenderApperanceStream has been removed due to internal changes that require us to render the appearance stream.
After setting the
value of a
PSPDFFormElement it is no longer necessary to send a
PSPDFAnnotationChangedNotification notification. This will be handled framework internally and the UI updates accordingly.
Previously it was possible to import
PSPDFFormElement annotations using XFDF. According to the XFDF spec, this is actually not supported and has been removed.
With PSPDFKit 6.5 for iOS we changed the superclass of
PSPDFBaseConfigurationBuilder. When using Swift 2.3 this type is not correctly inferred, which leads to a compiler error and seems to be a bug in Swift 2.3. To fix this, you need to cast the closure parameter to
This works correctly on Swift 3 and doesn't need any casting.