Some time ago saw a very good example of ios-charts-master, want to quote in their own projects, but has not been successful, even if the whole project intact moved over still, useless.
After an unexpected study, he finally succeeded.
Note the integration process.
1, the establishment of a project named Importchartdemo, casually set up a test.swift file, create a bridging file. OC refers to the Swift method for reference:
http://blog.csdn.net/zww1984774346/article/details/50506502
Set as follows, Product Module name is the project name (can be arbitrarily xx, imported as Xx-swift.h)
2. Copy the charts file from the Ios-charts-master to the Importchartdemo project file
This is the project catalog file (copy the charts to the file directory, in the import project)
Import charts.xcodeproj in Project, select Project-Right->add File ...
In order to experiment, you can test the file copy in Ios-charts-master
3. Configuration Engineering Dependent Library
4. Replace the chartsdemo-swift.h in the project with the Importchartdemo-swift.h compilation
Note: The importchartdemo-swift.h file is created for the system customization and cannot be created by itself, otherwise it is invalid. This header file system is not prompted and needs to be imported manually.
5.
Note: If you encounter such errors in real-machine debugging dyld: Library not loaded: @rpath/Charts.framework/Charts
, you need to configure the following in the project:
Reference from: http://www.bhyuu.com/custom-framework-not-loaded-dyld-library-not-loaded-rpath-custom-framework/
iOS Engineering introduces Ios-charts-master