| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- //
- // V8HorizontalPickerView.h
- //
- // Created by Shawn Veader on 9/17/10.
- // Copyright 2010 V8 Labs, LLC. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- #import "V8HorizontalPickerViewProtocol.h"
- // position of indicator view, if shown
- typedef enum {
- V8HorizontalPickerIndicatorBottom = 0,
- V8HorizontalPickerIndicatorTop
- } V8HorizontalPickerIndicatorPosition;
- @interface V8LabelNode : NSObject
- @property NSString *title;
- @property NSURL *file;
- @property UIImage *face;
- @end
- @interface V8HorizontalPickerView : UIView <UIScrollViewDelegate> { }
- // delegate and datasources to feed scroll view. this view only maintains a weak reference to these
- @property (nonatomic, weak) IBOutlet id <V8HorizontalPickerViewDataSource> dataSource;
- @property (nonatomic, weak) IBOutlet id <V8HorizontalPickerViewDelegate> delegate;
- @property (nonatomic, readonly) NSInteger numberOfElements;
- @property (nonatomic, readonly) NSInteger currentSelectedIndex;
- // what font to use for the element labels?
- @property (nonatomic, strong) UIFont *elementFont;
- // color of labels used in picker
- @property (nonatomic, strong) UIColor *textColor;
- @property (nonatomic, strong) UIColor *selectedTextColor; // color of current selected element
- // the point, defaults to center of view, where the selected element sits
- @property (nonatomic, assign) CGPoint selectionPoint;
- @property (nonatomic, strong) UIView *selectionIndicatorView;
- @property (nonatomic, assign) V8HorizontalPickerIndicatorPosition indicatorPosition;
- // views to display on edges of picker (eg: gradients, etc)
- @property (nonatomic, strong) UIView *leftEdgeView;
- @property (nonatomic, strong) UIView *rightEdgeView;
- // views for left and right of scrolling area
- @property (nonatomic, strong) UIView *leftScrollEdgeView;
- @property (nonatomic, strong) UIView *rightScrollEdgeView;
- // padding for left/right scroll edge views
- @property (nonatomic, assign) CGFloat scrollEdgeViewPadding;
- // select mask view
- @property (nonatomic, strong) UIView *selectedMaskView;
- - (void)reloadData;
- - (void)scrollToElement:(NSInteger)index animated:(BOOL)animate;
- @end
- // sub-class of UILabel that knows how to change it's state
- @interface V8HorizontalPickerLabel : UILabel <V8HorizontalPickerElementState> { }
- @property (nonatomic, assign) BOOL selectedElement;
- @property (nonatomic, strong) UIColor *selectedStateColor;
- @property (nonatomic, strong) UIColor *normalStateColor;
- @end
|