![]() |
Firemonkey iPad & iPhone in einer App
Hallo Zusammen...
Hab es jetzt endlich geschaft mir ein Mac-Book zu leihen und alles zu installieren um mal mit XE2 eine iOS App zu compilieren. Wie kann ich erkennen ob ich auf einen iPad oder iPhone gestartet wurde? Mavarik |
AW: Firemonkey iPad & iPhone in einer App
*PUSH* :oops:
|
AW: Firemonkey iPad & iPhone in einer App
Xcode
![]() Soll das beste (deutsche) OS X Forum sein. Ist aber bei weitem nicht so 'nett' wie hier... |
AW: Firemonkey iPad & iPhone in einer App
Zitat:
Trotzdem Danke... Mavarik |
AW: Firemonkey iPad & iPhone in einer App
Hi,
ich mache das so: Mainform mit Layout alClient. Folgender Code wird im Resize des Layouts und im Create der Form ausgeführt:
Delphi-Quellcode:
procedure TfrmMain.FormResize(Sender: TObject);
begin if frmPhoneQuer = nil then exit; if frmPadHoch = nil then exit; if frmPadQuer = nil then exit; loadView(sender); end;
Delphi-Quellcode:
Habe es noch nicht mit dem iPhone 5 getestet.
function TfrmMain.loadView(Sender: TObject): boolean;
begin try if frmMain.Width+frmMain.Height > 1010 then begin mydevice := 'iPad'; laHilfe.Visible := false; laInfo.Visible := false; end else mydevice := 'iPhone'; if frmMain.layoutContent.Width > frmMain.layoutContent.Height then format := 'Querformat' else format := 'Hochformat'; if myDevice = 'iPhone' then if format = 'Hochformat' then begin frmMain.layoutMain.Parent := frmMain.layoutContent; frmMain.layoutMain.Visible := true; frmPhoneQuer.layoutPhoneQuer.Visible := false; frmPadHoch.layoutPadHoch.Visible := false; frmPadQuer.layoutPadQuer.Visible := false; laHilfe.Visible := true; laInfo.Visible := true; end else begin frmPhoneQuer.layoutPhoneQuer.Parent := frmMain.layoutContent; laHilfe.Visible := false; laInfo.Visible := false; frmMain.layoutMain.Visible := false; frmPhoneQuer.layoutPhoneQuer.Visible := true; frmPadHoch.layoutPadHoch.Visible := false; frmPadQuer.layoutPadQuer.Visible := false; end; if myDevice = 'iPad' then if format = 'Hochformat' then begin frmPadHoch.layoutPadHoch.Parent := frmMain.layoutContent; frmMain.layoutMain.Visible := false; frmPhoneQuer.layoutPhoneQuer.Visible := false; frmPadHoch.layoutPadHoch.Visible := true; frmPadQuer.layoutPadQuer.Visible := false; frmPadHoch.swSwitch(frmPadHoch.swTarif); frmPadHoch.swSwitch(frmPadHoch.swKstPflicht); frmPadHoch.swSwitch(frmPadHoch.swKstSatz); end else begin frmPadQuer.layoutPadQuer.Parent := frmMain.layoutContent; frmMain.layoutMain.Visible := false; frmPhoneQuer.layoutPhoneQuer.Visible := false; frmPadHoch.layoutPadHoch.Visible := false; frmPadQuer.layoutPadQuer.Visible := true; frmPadQuer.swSwitch(frmPadQuer.swTarif); frmPadQuer.swSwitch(frmPadQuer.swKstPflicht); frmPadQuer.swSwitch(frmPadQuer.swKstSatz); end; frmMain.Height := TRUNC(frmMain.layoutHead.Height+ frmMain.layoutContent.Height+ frmMain.layoutBottom.Height); frmMain.Width := TRUNC(frmMain.layoutHead.Width); //Nur für PC frmMain.ClientHeight := TRUNC(frmMain.layoutHead.Height+ frmMain.layoutContent.Height+ frmMain.layoutBottom.Height); frmMain.ClientWidth := TRUNC(frmMain.layoutHead.Width); result := true; except result := false; end; end; Gruß Philip |
AW: Firemonkey iPad & iPhone in einer App
Zitat:
|
AW: Firemonkey iPad & iPhone in einer App
Jo, die Delphi-Tage. Da wurde das mehrfach gesagt.
|
AW: Firemonkey iPad & iPhone in einer App
Ahhhh, da war ich nicht. Also brauche ich kein XCode mehr? Na das wäre ja endlich mal was geiles!
Allerdings, moment, ohne XCode kommt mein Projekt doch nicht auf den Simulator bzw. auf's Gerät ... |
AW: Firemonkey iPad & iPhone in einer App
Die Ausführung im Simulator wurde vorgeführt. Wie EMBT hier technisch vorgeht wurde natürlich nicht gesagt.
![]() |
AW: Firemonkey iPad & iPhone in einer App
Wann soll den die Beta starten? Ist die dann für jeden registrierten XE3 Inhaber zugänglich?
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 19:31 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz