对于 Objective C 前往您项目的构建设置中搜索 Packaging。在它下面您会找到 Defines Module,然后将其改为 Yes。然后在构建您的项目。
import GraphingApp
//GraphingAppData.sharedInstance.setBarGraph([0.48, 2.0, 0.9, 1.68, 0.48], label: [“one”, “two”, “three”, “four”, “five”])
//GraphingAppData.sharedInstance.bckgrndImage = UIImage(named: “test”)
//GraphingAppData.sharedInstance.setLineGraph([0.36, 3.0, 0.28, 1.68, 0.72], label: [“one”, “two”, “three”, “four”, “five”])
//GraphingAppData.sharedInstance.bckgrndImage = UIImage(named: “sample”)
GraphingAppData.sharedInstance.setPieGraph([0.48, 2.0, 0.9, 1.68, 0.48, 1.78, 0.78, 2.48], label: [“test”, “try”, “exam”, “part”, “go”, “nice”, “add”, “any”])
@import GraphingApp;
[[GraphingAppData sharedInstance]setLineGraph:@[@0.48, @2.0, @0.9, @1.68, @0.48] label:@[@“one”, @“two”, @“three”, @“four”, @“five”]];
[[GraphingAppData sharedInstance].bckgrndImage = [UIImage imageNamed:@“sample”];
[[GraphingAppData sharedInstance]setLineGraph:@[@0.36, @3.0, @0.28, @1.68, @0.72] label:@[@“one”, @“two”, @“three”, @“four”, @“five”]];
[[GraphingAppData sharedInstance].bckgrndImage = [UIImage imageNamed:@“sample”];
[[GraphingAppData sharedInstance] setPieGraph:@[@0.48, @2.0, @0.9, @1.68, @0.48, @1.78, @0.78, @2.48] label:@[@“test”, @“try”, @“exam”, @“part”, @“go”, @“nice”, @“add”, @“any”]];
GraphingApp 通过 CocoaPods 可用。要安装它,只需将以下行添加到 Podfile:
pod "GraphingApp"
GraphingApp 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件。