首页 | 本学科首页   官方微博 | 高级检索  
     检索      

基于Runtime的iOS编程研究与实现
引用本文:胡坤,特日根.基于Runtime的iOS编程研究与实现[J].吉林大学学报(信息科学版),2021,39(1):106-113.
作者姓名:胡坤  特日根
作者单位:长光卫星技术有限公司数据中心,长春130000;长光卫星技术有限公司吉林省卫星遥感应用技术重点实验室,长春130000
基金项目:国家重点研发计划基金资助项目(2018YFB1004605); 吉林省科技计划-科技创新中心基金资助项目(20180623058TC)
摘    要:在iOS开发过程中,因为系统自带方法对应的功能不足,使部分业务需求不能有效地实现.为此,首先对Runtime库的主要API接口用途进行了研究,找到可利用的接口;然后对Runtime消息转发机制进行研究,证明函数调用的实质就是消息的传递;最后通过实际案例,证明了应用Runtime可以解决系统方法不足的问题.结果 表明,通过Runtime库给系统自带的类动态添加或修改成员变量和成员方法具有可行性,可为iOS开发者提供参考和借鉴.

关 键 词:iOS系统  运行时机制  函数调用  动态修改
收稿时间:2020-05-21

Research and Implementation of iOS Programming Based on Runtime Mechanism
HU Kun,TE Rigen.Research and Implementation of iOS Programming Based on Runtime Mechanism[J].Journal of Jilin University:Information Sci Ed,2021,39(1):106-113.
Authors:HU Kun  TE Rigen
Institution:a. Data Center; b. Key Laboratory of Satellite Remote Sensing Application Technology of Jilin Province, Changguang Satellite Technology Company Limited, Changchun 130000, China
Abstract:In the process of iOS application development, due to the insufficient functions of the system's own methods, some business requirements can not be effectively realized. In order to solve this problem, the main API interface usage of the Runtime library is studied and the available interfaces are found. The message forwarding mechanism of Runtime is studied to prove that the essence of the function call is the transmission of messages. And through actual cases, it proves that the application of Runtime can solve the problems caused by the lack of system methods. Therefore, it can dynamically add or modify member variables and member methods of the system's own classes through the Runtime library. And finally it is proved that the use of Runtime library can solve the problem of insufficient functions of the system, which can provide reference for iOS developers.
Keywords:iOS system  runtime mechanism  function call  dynamic modification  
本文献已被 万方数据 等数据库收录!
点击此处可从《吉林大学学报(信息科学版)》浏览原始摘要信息
点击此处可从《吉林大学学报(信息科学版)》下载免费的PDF全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号