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@:@@');

最新文章

  1. Oracle数据库坏块的恢复
  2. 【BZOJ-3450】Tyvj1952Easy 概率与期望DP
  3. 第五章:javascript:队列
  4. 从eclipse到Android studio/迁移eclipse的Android项目到Android studio平台的注意事项
  5. Monkey学习(4)简单测试实例
  6. poi实现Excel比较
  7. 随手记录一个 firefox的backgroundPostion-x和-y的问题
  8. 在慕课学习Bootstrap
  9. Poj 1328 / OpenJudge 1328 Radar Installation
  10. 应用SecureCRT(发送接收文件)
  11. Hash表题目整数hash-HDOJ1425(转载)
  12. 2014-7 Andrew Ng 自动化所报告听后感
  13. SqlBulkCopy 批量insert
  14. 用python实现一个小游戏——抽牌
  15. IIS 配置 HTTPS
  16. Laravel-mix 中文文档
  17. BZOJ 3171 循环格 最小费用流
  18. ubuntu18.04系统安装+基本环境配置【原创】
  19. Windows Redis安装,Java操作Redis
  20. GPU的历史:从固定管线到可编程管线再到通用计算平台

热门文章

  1. BZOJ2199 奶牛议会 【2-sat】
  2. flask第二十篇——模板【3】
  3. ubutun Sogou输入法安装
  4. (高级篇)jQuery学习之jQuery Ajax用法详解
  5. 关于浏览器和IIS基础的简单理解
  6. 用Eclipse进行java学习的步骤
  7. vuejs2.0的生命周期解读
  8. CSS内容简单归纳
  9. 1-3 superset数据模型
  10. foreach(PHP学习)