Where are the UIKit Framework implementation files located?

六月ゝ 毕业季﹏ 提交于 2019-12-28 02:07:34

问题


I can find the UIKit header files but i'd like to see how some of the UIKit classes are being implemented because i'm trying to create some custom controls.

So basically i'm trying to find the UIKit .m files, where would they be located on my mac?


回答1:


They aren't on your Mac (in source form). Only Apple has access to most UIKit source. What you have on your Mac is already compiled into library binary files.




回答2:


The source code (as hotpaw2 said) is only available to Apple, but there are multiple ways you can see what's going on:

  • Using the program class-dump (example output for UIKit: https://github.com/kennytm/iphone-private-frameworks/tree/master/UIKit/ ), you can view all the private methods and instance variables of the UIKit classes, to see how they implement them at a higher level.
  • Disassemblers, like IDA Pro ( http://hex-rays.com/ ) can disassemble and read the assembly-level code for the classes, although this is much lower level than is often useful.

So, while it's not as simple as opening up some .m files, it's certainly possible to see how Apple does things in UIKit!



来源:https://stackoverflow.com/questions/4181024/where-are-the-uikit-framework-implementation-files-located

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!