- Status: Open
- Priority: Normal
- Resolution: Unresolved
- Platform: iOS
- Affects version 1.20.1.0
Since 1.20.0.0 Show/Close animate by themselves. Existing code that hides the form on
its own and calls Close afterwards now crashes on iOS:
FAnimation.OnFinishCallback := procedure
begin
Camera.Active := False;
Hide; // form is already hidden here
end;
procedure TFormScanner.btnBackTap(Sender: TObject);
begin
FAnimation.Stop; // Stop calls Finish -> OnFinishCallback -> Hide
Close; // animated close on an already hidden form
end;
Result:
Exception EAccessViolation in module libobjcMsgSend.dylib
[WARNING] [Animation] You are destroying an animation that is marked for autodeletion!
(TfgiOSAnimationFormPadding)
Runtime error 217
Show(TfgFormPresentationStyle.None) avoids it, because the form then closes without
animation as well. It might be worth guarding Close/Hide against being called on a
form that is already hidden.
Recommended Comments
Create an account or sign in to comment