在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
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@:@@');
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论