Skip to content

Commit b2fefbc

Browse files
author
XuYafei
committed
add icon and launch/ modify readme
1 parent 11bfb06 commit b2fefbc

File tree

14 files changed

+33
-23
lines changed

14 files changed

+33
-23
lines changed

LPLineChartViewDemo/LPLineChartViewDemo/Assets.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,39 @@
11
{
22
"images" : [
33
{
4-
"idiom" : "iphone",
54
"size" : "29x29",
5+
"idiom" : "iphone",
6+
"filename" : "[email protected]",
67
"scale" : "2x"
78
},
89
{
9-
"idiom" : "iphone",
1010
"size" : "29x29",
11+
"idiom" : "iphone",
12+
"filename" : "[email protected]",
1113
"scale" : "3x"
1214
},
1315
{
14-
"idiom" : "iphone",
1516
"size" : "40x40",
17+
"idiom" : "iphone",
18+
"filename" : "[email protected]",
1619
"scale" : "2x"
1720
},
1821
{
19-
"idiom" : "iphone",
2022
"size" : "40x40",
23+
"idiom" : "iphone",
24+
"filename" : "[email protected]",
2125
"scale" : "3x"
2226
},
2327
{
24-
"idiom" : "iphone",
2528
"size" : "60x60",
29+
"idiom" : "iphone",
30+
"filename" : "[email protected]",
2631
"scale" : "2x"
2732
},
2833
{
29-
"idiom" : "iphone",
3034
"size" : "60x60",
35+
"idiom" : "iphone",
36+
"filename" : "[email protected]",
3137
"scale" : "3x"
3238
}
3339
],
Loading
Loading
Loading
Loading
Loading
Loading

LPLineChartViewDemo/LPLineChartViewDemo/Assets.xcassets/Brand Assets.launchimage/Contents.json

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,38 @@
11
{
22
"images" : [
33
{
4-
"orientation" : "portrait",
5-
"idiom" : "iphone",
64
"extent" : "full-screen",
7-
"minimum-system-version" : "8.0",
5+
"idiom" : "iphone",
86
"subtype" : "736h",
7+
"filename" : "LaunchImage1240x2208.png",
8+
"minimum-system-version" : "8.0",
9+
"orientation" : "portrait",
910
"scale" : "3x"
1011
},
1112
{
12-
"orientation" : "portrait",
13-
"idiom" : "iphone",
1413
"extent" : "full-screen",
15-
"minimum-system-version" : "8.0",
14+
"idiom" : "iphone",
1615
"subtype" : "667h",
16+
"filename" : "LaunchImage750x1334.png",
17+
"minimum-system-version" : "8.0",
18+
"orientation" : "portrait",
1719
"scale" : "2x"
1820
},
1921
{
2022
"orientation" : "portrait",
2123
"idiom" : "iphone",
24+
"filename" : "LaunchImage640x960.png",
2225
"extent" : "full-screen",
2326
"minimum-system-version" : "7.0",
2427
"scale" : "2x"
2528
},
2629
{
27-
"orientation" : "portrait",
28-
"idiom" : "iphone",
2930
"extent" : "full-screen",
30-
"minimum-system-version" : "7.0",
31+
"idiom" : "iphone",
3132
"subtype" : "retina4",
33+
"filename" : "LaunchImage640x1136.png",
34+
"minimum-system-version" : "7.0",
35+
"orientation" : "portrait",
3236
"scale" : "2x"
3337
}
3438
],

LPLineChartViewDemo/LPLineChartViewDemo/Info.plist

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<key>CFBundleInfoDictionaryVersion</key>
1212
<string>6.0</string>
1313
<key>CFBundleName</key>
14-
<string>$(PRODUCT_NAME)</string>
14+
<string>LineChartView</string>
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
@@ -22,8 +22,6 @@
2222
<string>1</string>
2323
<key>LSRequiresIPhoneOS</key>
2424
<true/>
25-
<key>UILaunchStoryboardName</key>
26-
<string>LaunchScreen</string>
2725
<key>UIRequiredDeviceCapabilities</key>
2826
<array>
2927
<string>armv7</string>

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# LPLineChartView
2-
参照UICollectionview的架构实现的折线图LPLineChartView。将布局交给Layout实现,通过Layer进行绘制。提供“虚基类”LPLineChartViewLayout,定义需要的空方法。在LPLineChartView里用强指针指针指向LPLineChartViewLayout的实例
2+
参照UICollectionview的架构实现的折线图LPLineChartView。将布局交给Layout实现,通过Layer进行绘制。提供“虚基类”LPLineChartViewLayout定义需要的空方法。在LPLineChartView里用强指针指向LPLineChartViewLayout的实例
33

44
在这种设计模式下,UICollectionview基本所有与UI相关的部件全都通过Layout去获取对应的Layer。这样的好处类似于UICollectionview,基本可是实现任何想要的布局。比如:轴线、箭头、数据点、连接线、参考线、轴线文字、背景等都是通过Layout去获取对应的Layer。这样用户就可以充分开发脑洞去绘制任何想要的效果。(任何形状,贝塞尔曲线,渐变,字体,甚至图片,遮罩都是可以的)当然,这种模式下,必然导致使用的难度极度增加。所以就必须实现一个默认实现LPLineChartViewCustomLayout。(类似UICollectionview的UICollectionviewFlowLayout)
55

6-
LPLineChartViewCustomLayout继承自LPLineChartViewLayout,实现了所有需要定制的内容。然后在头文件中提供参数去设置布局过程中的一些主要样式。通过这些参数基本可以实现大部分对折线图的个性化定制。在使用的时候通过子类化LPLineChartViewCustomLayout,在prepareLayout方法中重新设置这些参数的部分,被设置的部分就会覆盖LPLineChartViewCustomLayout的默认值。
6+
LPLineChartViewCustomLayout继承自LPLineChartViewLayout,实现了所有需要定制的内容。然后在头文件中提供参数去设置布局过程中的一些主要样式。通过这些参数基本可以实现大部分对折线图的个性化定制。
7+
8+
在使用的时候通过子类化LPLineChartViewCustomLayout,在prepareLayout方法中重新设置这些参数的部分,被设置的部分就会覆盖LPLineChartViewCustomLayout的默认值。
79
如果个别地方实在不能满足需求,也可以通过在子类中重新实现部分相关的方法去通过Layer自由定制。
810

9-
这样就提供了既简单又可高度定制的折线图。下边我自己实现了几种效果,这些效果均在10行代码以内实现。如下。(右上角样式为LPLineChartViewCustomLayout)
11+
通过两种方案的结合就提供了使用既简单又可高度定制的折线图。下边实现了几种展示效果,这些效果均在10行代码以内实现。如下。(右上角样式为LPLineChartViewCustomLayout)
1012

11-
注:如果图片不能显示请尝试将VPN设为全局模式,也可以通过备用链接查看
13+
注:如果图片不能显示请尝试将VPN设为全局模式,也可以关闭VPN通过备用链接查看
1214

1315
[备用链接](http://b.picphotos.baidu.com/album/s%3D1000%3Bq%3D90/sign=088f6bed7dec54e745ec1e1e8908a021/8326cffc1e178a8290b19973f003738da877e850.jpg)
1416

@@ -84,7 +86,7 @@ LPLineChartViewCustomLayout可供设置的属性,如下。
8486

8587
#DataSource
8688

87-
数据源采用数组赋值的方式传入
89+
数据源采用数组赋值的方式注入
8890

8991
data:数据源
9092

0 commit comments

Comments
 (0)