class_addMethod

学习FMX.Platform.iOS.pas文件的处理办法

d:\program files (x86)\embarcadero\studio\17.0\source\fmx\FMX.Platform.iOS.pas

performFetchWithCompletionHandler

procedure performFetchWithCompletionHandler(self : id; _cmd : SEL; application: PUIApplication; handler : id );
var
ahandlerimp: IMP;
begin
//Code to perform fetch HERE!!!!
fecth_string_test := 'entered background code!!'; ahandlerimp := imp_implementationWithBlock( handler ); //Create c function for block
ahandlerimp(self,_cmd, UIBackgroundFetchResultNewData); //Call c function, _cmd is ignored
imp_removeBlock(ahandlerimp); //Remove the c function created two lines up
end;
class_addMethod(objc_getClass('DelphiAppDelegate') ,
sel_getUid('application:performFetchWithCompletionHandler:'),
@performFetchWithCompletionHandler,
'v@:@?');

applicationDidReceiveLocalNotification

procedure applicationDidReceiveLocalNotification(self: id; _cmd: SEL;
application: PUIApplication; notification: Pointer);
begin
ShowMessage('it works');
end;
class_addMethod(objc_getClass('DelphiAppDelegate'), sel_getUid('application:didReceiveLocalNotification:'),
@applicationDidReceiveLocalNotification, 'v@:@@');

Delphi IOS class_addMethod的更多相关文章

  1. Delphi IOS 蓝牙锁屏后台运行

    Delphi IOS 后台运行 同样的程序,编译成android,锁屏后继续运行正常,蓝牙通讯正常,但在IOS下锁屏后程序的蓝牙就中断通讯了? IOS的机制就是这样,锁屏就关闭了. 音乐播放器是怎么做 ...

  2. 苹果开发证书相关BLOG与Delphi IOS环境安装(超详细)

    注:有好的资源,请添加了上传,上传后,通知管理员,删除旧文件,累积相关的学习资源,方便新手学习 一.相关论坛http://www.2ccc.com/ delphi 合子 www.2pascal.com ...

  3. delphi ios info.plist

    delphi ios info.plist delphi修改info.plist.TemplateiOS.xml文件,然后自动生成project1.info.plist http://docwiki. ...

  4. delphi IOS 通知 TNotification

    delphi  IOS 通知 TNotification http://blogs.embarcadero.com/ao/2013/05/01/39450 TNotification http://d ...

  5. Delphi iOS 开启文件共享 UIFileSharingEnabled

    Apple 在 iOS 提供了文件共享(FileSharing)功能,让 App 有一个对外窗口的目录,透过 iTunes 可以任意管理这个目录的文档内容(可拖入文档,也能将文档拖出备份). 如果 A ...

  6. Delphi IOS环境安装

    RAD Delphi XE/10 Seattle 安装IOS.OSX环境安装,IOS模拟器,MAC X 真机可以调试 http://community.embarcadero.com/blogs/en ...

  7. Delphi IOS MusicPlayer 锁屏运行学习

    [weak] FMusicPlayer: TMusicPlayer; [weak]修饰, 编译器在处理这个变量的时候不会调用该变量内容的__ObjAddRef和__ObjRelease., proce ...

  8. Delphi IOS开发环境安装

    RAD Delphi XE/10 Seattle 安装IOS.OSX环境安装,IOS模拟器,MAC X 真机可以调试 http://community.embarcadero.com/blogs/en ...

  9. delphi ios grid BindSourceDB bug

    BindSourceDB4.DataSet :=nil; BindSourceDB4.DataSet :=FDMemTable1; grid绑定后显示数据正常,第二次赋值BindSourceDB4.D ...

随机推荐

  1. RBM

    1. 玻尔兹曼分布: $$p(E) \thicksim e^{-E/kT} $$ 2. RBM 两层:隐层和可视层, $\mathbf v$, $\mathbf h$ $$v_i \in \{0, 1 ...

  2. Vim:基础

    Normal模式 即是command “vim test.txt” 时进入的界面. 常用command: :help<Enter>   查看命令. :wq<Enter>     ...

  3. Jmeter简单的操作数据库

    mysql驱动包下载地址: https://dev.mysql.com/downloads/connector/j/ 1.添加驱动配置,把下载下来的驱动配置上去 2.添加‘配置元件-用户定义的变量’, ...

  4. Cookie用法

    //写入 protected void Button1_Click(object sender, EventArgs e) { HttpCookie cookie=new HttpCookie(&qu ...

  5. salesforce 公开网页,免登陆

    設定→カスタマイズ→コミュニテ→新建一个visfualforce的コミュニテ ビルド->カスタマイズ->コミュニティ->すべてのコミュニティ->新規コミュニティ 然后选中新规的 ...

  6. Altera的几个常用的Synthesis attributes(转载)

    各厂商综合工具,对HDL综合时都定义了一些综合属性这些属性可指定a declaration,a module item,a statement, or a port connection 不同的综合方 ...

  7. modelsim仿真常用系统函数

    (1)$time 作用:返回所在模块的仿真时间,可以查看信号的出现的时间,用来把握信号的时序. 如:$display(''the time is %t'',$time) ;//显示当时的时间 (2)$ ...

  8. CentOS 中安装NFS

    NFS(network file system)网络文件系统,类似Windows中的文件夹共享,如下有三台机器A, B, C,它们需要访问同一个目录,目录中都是图片,传统的做法是把这些图片分别放到A, ...

  9. flash无法导入mp3文件

    用全能音频转换通转换下,一切采用默认即可,点击下载地址 这个软件真心好用. 把mp3拖入其中,点击批量转换,参数默认,即可.

  10. 使用CXF开发简单的Web Service-HelloWorld(二)

    上篇博文我们介绍了Web Service的基本概念,了解它的基本概念之后,我们这篇博文介绍一个开源的WebService框架-Apache CXF,并实现一个HelloWorld实例. 一.开始之前 ...