Where are the UIKit Framework implementation files located?

后端 未结 2 901
走了就别回头了
走了就别回头了 2020-11-30 09:06

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 bas

相关标签:
2条回答
  • 2020-11-30 09:14

    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!

    0 讨论(0)
  • 2020-11-30 09:28

    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.

    0 讨论(0)
提交回复
热议问题