Hi,
If I drop a TDPFUIViewController on a form at designtime then assign the frame at runtime everything works as expected.
If I create a TDPFUIViewController at runtime with the following code, I only see a black form when run on the iOS simulator.
procedure TMyForm.FormCreate(Sender: TObject); var DPFUIViewController: TDPFUIViewController; begin DPFUIViewController := TDPFUIViewController.Create(Self); DPFUIViewController.Parent := Self; DPFUIViewController.Align := TAlignLayout.Client; DPFUIViewController.Frame := TIOSMain; end;
Do I need to assign some other properties to TDPFUIViewController?
Cheers, Paul
Off the top of my head, I think you need to put DPFUIViewController.Loaded; before assigning the frame.
I am not right now on my computer to check it...
Thanks Diego, that did the trick :)
Log in to post a comment.
Hi,
If I drop a TDPFUIViewController on a form at designtime then assign the frame at runtime everything works as expected.
If I create a TDPFUIViewController at runtime with the following code, I only see a black form when run on the iOS simulator.
procedure TMyForm.FormCreate(Sender: TObject);
var
DPFUIViewController: TDPFUIViewController;
begin
DPFUIViewController := TDPFUIViewController.Create(Self);
DPFUIViewController.Parent := Self;
DPFUIViewController.Align := TAlignLayout.Client;
DPFUIViewController.Frame := TIOSMain;
end;
Do I need to assign some other properties to TDPFUIViewController?
Cheers,
Paul
Last edit: Paul 2014-05-19
Off the top of my head, I think you need to put DPFUIViewController.Loaded; before assigning the frame.
I am not right now on my computer to check it...
Thanks Diego, that did the trick :)