-
Notifications
You must be signed in to change notification settings - Fork 87
/
JYLegendView.h
27 lines (21 loc) · 1003 Bytes
/
JYLegendView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//
// JYLegendView.h
// JYRadarChart
//
// Created by jy on 13-10-31.
// Copyright (c) 2013年 wcode. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface JYLegendView : UIView
@property (nonatomic, copy) NSArray *titles;
@property (nonatomic, strong) NSMutableArray *colors;
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000
#define JY_TEXT_SIZE(text, font) [text length] > 0 ? [text sizeWithAttributes : @{ NSFontAttributeName : font }] : CGSizeZero;
#define JY_DRAW_TEXT_AT_POINT(text, point, font) [text drawAtPoint : point withAttributes : @{ NSFontAttributeName:font }];
#define JY_DRAW_TEXT_IN_RECT(text, rect, font) [text drawInRect : rect withAttributes : @{ NSFontAttributeName:font }];
#else
#define JY_TEXT_SIZE(text, font) [text length] > 0 ? [text sizeWithFont : font] : CGSizeZero;
#define JY_DRAW_TEXT_AT_POINT(text, point, font) [text drawAtPoint : point withFont : font];
#define JY_DRAW_TEXT_IN_RECT(text, rect, font) [text drawInRect : rect withFont : font];
#endif
@end