ANDLineChartView 使用教程
ANDLineChartViewANDLineChartView is easy to use view-based class for displaying animated line chart.项目地址:https://gitcode.com/gh_mirrors/an/ANDLineChartView
1、项目的目录结构及介绍
ANDLineChartView 项目的目录结构如下:
ANDLineChartView/
├── ANDLineChartView
│ ├── ANDLineChartView.h
│ ├── ANDLineChartView.m
│ └── ANDLineChartViewExample.xcodeproj
├── Example
│ ├── ANDLineChartViewExample
│ │ ├── ViewController.h
│ │ ├── ViewController.m
│ │ └── main.m
│ └── ANDLineChartViewExample.xcodeproj
├── LICENSE
├── README.md
├── example.gif
├── screen1.png
└── screen2.png
目录结构介绍
ANDLineChartView/:包含核心的 ANDLineChartView 类文件和示例项目的 Xcode 工程。Example/:包含示例应用的源代码和 Xcode 工程。LICENSE:项目的开源许可证文件。README.md:项目的说明文档。example.gif、screen1.png、screen2.png:项目的截图和示例动图。
2、项目的启动文件介绍
在示例项目中,启动文件是 Example/ANDLineChartViewExample/main.m。这个文件是 iOS 应用的入口点,负责启动应用并加载应用的第一个视图控制器。
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
启动文件介绍
main.m:应用的入口文件,调用UIApplicationMain函数启动应用,并指定AppDelegate类作为应用的代理。
3、项目的配置文件介绍
项目的配置文件主要是 ANDLineChartView.podspec,这个文件用于配置 CocoaPods 库的信息。
Pod::Spec.new do |s|
s.name = "ANDLineChartView"
s.version = "0.2.2"
s.summary = "ANDLineChartView is easy to use view-based class for displaying animated line chart."
s.description = <<-DESC
ANDLineChartView is easy to use view-based class for displaying animated line chart.
* Markdown format
* Don't worry about the indent, we strip it.
DESC
s.homepage = "https://github.com/anaglik/ANDLineChartView"
s.screenshots = ["https://raw.github.com/anaglik/ANDLineChartView/master/screen1.png", "https://raw.github.com/anaglik/ANDLineChartView/master/screen2.png"]
s.license = 'MIT'
s.author = { "Andrzej Naglik" => "dev.an@icloud.com" }
s.source = { :git => "https://github.com/anaglik/ANDLineChartView.git", :tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/andy_namic'
s.platform = :ios, '7.0'
s.requires_arc = true
s.source_files = 'ANDLineChartView'
end
配置文件介绍
s.name:库的名称。s.version:库的版本号。s.summary:库的简短描述。s.description:库的详细描述。s.homepage:库的主页地址。s.screenshots:库的截图地址。s.license:库的许可证类型。s.author:库的作者信息。s.source:库的源代码地址和版本标签。s.social_media_url:作者的社交媒体链接。s.platform:库支持的平台和版本。s.requires_arc:是否需要 ARC 支持。s.source_files:库的源代码文件路径。
ANDLineChartViewANDLineChartView is easy to use view-based class for displaying animated line chart.项目地址:https://gitcode.com/gh_mirrors/an/ANDLineChartView