gioma
-
Content Count
115 -
Joined
-
Last visited
Posts posted by gioma
-
-
Solved, thanks.
The problem was that I didn't put the font file in the project folder. I had put it in a subfolder! Bha -
Yes, I know that the SetStatusBar function is obsolete and now there is no other function to do it.
I found a solution, to open the module that I would like to show only in Landscape, I show a message to the user to inform him that he must rotate the phone to open it.
Then, when the user rotates the phone, the "onResize" event is activated. In this event the orientation is set only to Landscape and then the form is opened. -
Hi,
I'd like to use custom fonts for my multi-device app.
I chose the roboto font, and for Android deploy there is no problem.
The problem is with the iOS deploy, I addedd the roboto .ttf files at the Deployment page and I edited the "info.plist.TemplateiOS.xml" adding this section:<key>UIAppFonts</key> <array> <string>Roboto-Black.ttf</string> <string>Roboto-BlackItalic.ttf</string> <string>Roboto-Bold.ttf</string> <string>Roboto-BoldItalic.ttf</string> <string>Roboto-Italic.ttf</string> <string>Roboto-Light.ttf</string> <string>Roboto-LightItalic.ttf</string> <string>Roboto-Medium.ttf</string> <string>Roboto-MediumItalic.ttf</string> <string>Roboto-Regular.ttf</string> <string>Roboto-Thin.ttf</string> <string>Roboto-ThinItalic.ttf</string> </array>
However when I install and run the app in the iPhone the app show the default font.
What I'm wrong?
-
Hi,
I need to rotate the screen at runtime when I open a form.
Until the release of IOS 13 this code worked perfectly:procedure ChangeOrientation(toOrientation: UIInterfaceOrientation; possibleOrientations: TScreenOrientations); var win : UIWindow; App : UIApplication; viewController : UIViewController; oucon: UIViewController; begin Application.FormFactor.Orientations := []; //Change supported orientations App := TUIApplication.Wrap(TUIApplication.OCClass.sharedApplication); win := TUIWindow.Wrap(App.windows.objectAtIndex(0)); //The first Windows is always the main Window App.setStatusBarOrientation(toOrientation); {After you have changed your statusbar orientation set the Supported orientation/orientations to whatever you need} Application.FormFactor.Orientations := possibleOrientations; viewController := TUIViewController.Wrap(TUIViewController.alloc.init);//dummy ViewController oucon := TUIViewController.Wrap(TUIViewController.alloc.init); {Now we are creating a new Viewcontroller now when it is created it will have to check what is the supported orientations} oucon := win.rootViewController;//we store all our current content to the new ViewController Win.setRootViewController(viewController); Win.makeKeyAndVisible;// We display the Dummy viewcontroller win.setRootViewController(oucon); win.makeKeyAndVisible; {And now we Display our original Content in a new Viewcontroller with our new Supported orientations} end;
However, since the release of IOS 13 the screen locks on the set orientation but does not rotate. So if I set Landscape orientation the screen remains in Portrait orientation until I physically turn the phone around, at which point it rightly remains locked on that orientation.
This is a real disaster because then, until the phone is turned, all the controls ( finger position, object position,..) are wrong. -
nothing,
it works like a charm!
-
19 minutes ago, M.Joos said:I think your code did not work with Delphi Tokio (10.2.3) either. You should set the stored property of your child components (Panel, Rectangle, Timer) to false.
You saved me. Now it works like a charm!
Thank you very much! -
is there something wrong with my code?
-
I created a component and used it on a project that works great with Delphi Tokio (10.2.3).
When I opened the same project with Delphi Rio (10.3.2) instead I found a very strange problem.
The class that I have created derives from a TCustomScrollBox and has a TPanel a TRectangle, and a TTimer between the private objects which are then created at runtime in the create function of the class.
The problem is that when I open the project the form containing an object of that class immediately creates at designtime one objects ( TTimer) without a name.
If I switch to displaying the form as textand then going back to the display as a form it creates TTimer again and it creates other two unnamed objects (TPanel and TRectangle) (so each time it adds three unnamed objects).code:
interface TCustomClass = class(TCustomScrollBox) private BitmapPanel: TPanel; CursorPanel: TRectangle; DragClickTimer: TTimer; .. public constructor Create(AOwner: TComponent); override; ... implementation constructor TCustomClass.Create(AOwner: TComponent); var k: TScrollCalculations; begin inherited; ... BitmapPanel := TPanel.Create(self); BitmapPanel.Parent := self; BitmapPanel.OnPaint := BitmapPanelPaint; BitmapPanel.ClipParent := True; BitmapPanel.Enabled:=false; CursorPanel:= TRectangle.Create(self); CursorPanel.Parent := Self; CursorPanel.ClipParent:=True; CursorPanel.Fill.Kind:=TBrushKind.None; CursorPanel.Stroke.Kind:=TBrushKind.None; CursorPanel.OnPaint:=CursorPanelPanelPaint; CursorPanel.Enabled:=false; DragClickTimer := TTimer.Create(TFmxObject(AOwner)); DragClickTimer.enabled := False; DragClickTimer.interval := 700; DragClickTimer.OnTimer := DragClickTimerTimer; end;
This happens when I open the form containing an object of that class:
This is the code that generates when I switch to displaying the form as text:
object mView: TRtcMobileDesktopViewer Touch.InteractiveGestures = [Zoom, Pan, TwoFingerTap, LongTap, DoubleTap] OnTap = mViewTap Anchors = [akLeft, akTop, akRight, akBottom] Position.X = 24.000000000000000000 Size.Width = 647.000000000000000000 Size.Height = 329.000000000000000000 Size.PlatformDefault = False Viewport.Width = 647.000000000000000000 Viewport.Height = 329.000000000000000000 object TPanel ClipParent = True Enabled = False Size.Width = 647.000000000000000000 Size.Height = 329.000000000000000000 Size.PlatformDefault = False TabOrder = 0 end object TRectangle ClipParent = True Enabled = False Fill.Kind = None Size.Width = 647.000000000000000000 Size.Height = 329.000000000000000000 Size.PlatformDefault = False Stroke.Kind = None end end object TTimer Enabled = False Interval = 700 end
Application Loader no longer included in Xcode11
in FMX
Posted
Hi,
I open a report to request App Store support.
https://quality.embarcadero.com/browse/RSP-26465
In this way is very difficult continue to develop app with Delphi, they have to speed up!