Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Delphi XE4 iOS加载位图-未加载文件_Ios_Delphi_Bitmap_Delphi Xe4 - Fatal编程技术网

Delphi XE4 iOS加载位图-未加载文件

Delphi XE4 iOS加载位图-未加载文件,ios,delphi,bitmap,delphi-xe4,Ios,Delphi,Bitmap,Delphi Xe4,我的XE4应用程序在win上运行良好,但无法在iOS中加载位图。该文件确实存在(已在终端窗口中签入),Findfirst将找到它。我在iOS中没有得到异常,但如果win中不存在该文件,我会得到一个异常,因此“IsEmpty”检查将在iOS中运行 那么,关于它为什么不加载存在的文件并且不引发异常,有什么线索吗 干杯 {$IFDEF MSWINDOWS} if FindFirst('.\*.*', faAnyFile, SR) = 0 then repeat showmessage(

我的XE4应用程序在win上运行良好,但无法在iOS中加载位图。该文件确实存在(已在终端窗口中签入),Findfirst将找到它。我在iOS中没有得到异常,但如果win中不存在该文件,我会得到一个异常,因此“IsEmpty”检查将在iOS中运行

那么,关于它为什么不加载存在的文件并且不引发异常,有什么线索吗

干杯

{$IFDEF MSWINDOWS}
  if FindFirst('.\*.*', faAnyFile, SR) = 0 then
  repeat
    showmessage(SR.Name);
  until FindNext(SR) <> 0;
  FindClose(SR);

  imgImage.Bitmap.LoadFromFile('.\'+'myfile.gif');

{$ELSE}
  if FindFirst(GetHomePath + PathDelim + Application.Title + '.app' + PathDelim+'*.*', faAnyFile, SR) = 0 then
  repeat
    showmessage(SR.Name);
  until FindNext(SR) <> 0;
  FindClose(SR);

  imgImage.Bitmap.LoadFromFile(GetHomePath + PathDelim + Application.Title + '.app' + PathDelim + 'myfile.gif');

{$ENDIF}
{$IFDEF MSWINDOWS}
如果FindFirst('.\*.*',faAnyFile,SR)=0,则
重复
showmessage(SR.Name);
直到FindNext(SR)0;
FindClose(SR);
imgImage.Bitmap.LoadFromFile('.\'+'myfile.gif');
{$ELSE}
如果FindFirst(GetHomePath+PathDelim+Application.Title+'.app'+PathDelim+'*.*.',faAnyFile,SR)=0,则
重复
showmessage(SR.Name);
直到FindNext(SR)0;
FindClose(SR);
imgImage.Bitmap.LoadFromFile(GetHomePath+PathDelim+Application.Title+'.app'+PathDelim+'myfile.gif');
{$ENDIF}

在delphi单元中进行了一些调试,似乎在iOS上不支持gif。这可能是一个bug,但回答了我的问题