Toggle navigation
Toggle navigation
This project
Loading...
Sign in
iOS
/
PNChart
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
kevinzhow
2014-12-12 01:27:33 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
664b146f201043c105f835898c06ab5c5d389915
664b146f
2 parents
0b050d81
9a31f530
Merge branch 'feature/dynamic_value_update' into develop
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
8 deletions
PNChart/PNCircleChart.m
PNChartDemo/Base.lproj/Main.storyboard
PNChartDemo/PCChartsTableViewController.m
PNChart/PNCircleChart.m
View file @
664b146
...
...
@@ -33,7 +33,7 @@
CGFloat
endAngle
=
clockwise
?
-
90
.
01
f
:
270
.
01
f
;
_lineWidth
=
@8.0f
;
UIBezierPath
*
circlePath
=
[
UIBezierPath
bezierPathWithArcCenter
:
CGPointMake
(
self
.
frame
.
size
.
width
/
2
,
self
.
frame
.
size
.
height
/
2
)
UIBezierPath
*
circlePath
=
[
UIBezierPath
bezierPathWithArcCenter
:
CGPointMake
(
self
.
center
.
x
,
self
.
center
.
y
)
radius
:(
self
.
frame
.
size
.
height
*
0
.
5
)
-
[
_lineWidth
floatValue
]
startAngle:
DEGREES_TO_RADIANS
(
startAngle
)
endAngle:
DEGREES_TO_RADIANS
(
endAngle
)
...
...
PNChartDemo/Base.lproj/Main.storyboard
View file @
664b146
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"
5056"
systemVersion=
"13C1021
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
initialViewController=
"9Rt-UT-IxH"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"
6254"
systemVersion=
"14B25
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
initialViewController=
"9Rt-UT-IxH"
>
<dependencies>
<deployment
defaultVersion=
"1536"
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"
3733
"
/>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"
6247
"
/>
</dependencies>
<scenes>
<!--
Chart View Controller -
PNChart-->
<!--PNChart-->
<scene
sceneID=
"lC9-iu-Smd"
>
<objects>
<viewController
id=
"Tha-Wr-sPW"
customClass=
"PCChartViewController"
sceneMemberID=
"viewController"
>
...
...
@@ -16,7 +16,19 @@
<view
key=
"view"
contentMode=
"scaleToFill"
id=
"PPb-b8-nBo"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"320"
height=
"568"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<subviews>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"L3F-13-Wf5"
>
<rect
key=
"frame"
x=
"113"
y=
"364"
width=
"95"
height=
"30"
/>
<state
key=
"normal"
title=
"Change Value"
>
<color
key=
"titleShadowColor"
white=
"0.5"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</state>
</button>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstItem=
"L3F-13-Wf5"
firstAttribute=
"top"
secondItem=
"znr-YO-4a4"
secondAttribute=
"bottom"
constant=
"300"
id=
"ewm-kv-p8k"
/>
<constraint
firstAttribute=
"centerX"
secondItem=
"L3F-13-Wf5"
secondAttribute=
"centerX"
id=
"zXw-WV-mro"
/>
</constraints>
</view>
<navigationItem
key=
"navigationItem"
title=
"PNChart"
id=
"Ukg-Sg-E2z"
/>
</viewController>
...
...
@@ -24,7 +36,7 @@
</objects>
<point
key=
"canvasLocation"
x=
"536"
y=
"31"
/>
</scene>
<!--
Charts Table View Controller -
PNChart-->
<!--PNChart-->
<scene
sceneID=
"pBo-qW-N8B"
>
<objects>
<tableViewController
id=
"cc5-BF-Ga2"
customClass=
"PCChartsTableViewController"
sceneMemberID=
"viewController"
>
...
...
PNChartDemo/PCChartsTableViewController.m
View file @
664b146
...
...
@@ -136,9 +136,9 @@
[
PNPieChartDataItem
dataItemWithValue
:
40
color
:
PNDeepGreen
description
:
@"GOOG I/O"
],
];
PNPieChart
*
pieChart
=
[[
PNPieChart
alloc
]
initWithFrame
:
CGRectMake
(
40
.
0
,
155
.
0
,
240
.
0
,
24
0
.
0
)
items
:
items
];
PNPieChart
*
pieChart
=
[[
PNPieChart
alloc
]
initWithFrame
:
CGRectMake
(
SCREEN_WIDTH
/
2
.
0
-
100
,
135
,
200
.
0
,
20
0
.
0
)
items
:
items
];
pieChart
.
descriptionTextColor
=
[
UIColor
whiteColor
];
pieChart
.
descriptionTextFont
=
[
UIFont
fontWithName
:
@"Avenir-Medium"
size
:
1
4
.
0
];
pieChart
.
descriptionTextFont
=
[
UIFont
fontWithName
:
@"Avenir-Medium"
size
:
1
1
.
0
];
pieChart
.
descriptionTextShadowColor
=
[
UIColor
clearColor
];
[
pieChart
strokeChart
];
...
...
Please
register
or
login
to post a comment