我正在开发中Firemonkey XE4的iOS应用程序,需要防止设备在没有用户输入的睡眠。 我发现这个命令Xcode开发:
[应用setIdleTimerDisabled:YES];
我相信有在FMX等效?
任何人都可以帮助吗?
谢谢
达里尔
我正在开发中Firemonkey XE4的iOS应用程序,需要防止设备在没有用户输入的睡眠。 我发现这个命令Xcode开发:
[应用setIdleTimerDisabled:YES];
我相信有在FMX等效?
任何人都可以帮助吗?
谢谢
达里尔
你可以直接去UIApplication的,像这样:
uses
iOSapi.UIKit;
{$R *.fmx}
procedure TForm6.Button1Click(Sender: TObject);
var
UIApp : UIApplication;
begin
UIApp := TUIApplication.Wrap(TUIApplication.OCClass.sharedApplication);
UIApp.setIdleTimerDisabled(True);
end;