-
Notifications
You must be signed in to change notification settings - Fork 43
Description
I want to create image selector. selecting one image, the image move to center and hight light. I define the function "- (UIView *)horizontalPickerView:(V8HorizontalPickerView *)picker viewForElementAtIndex:(NSInteger)index" and implement the protocol "V8HorizontalPickerElementState". when I first reloadData, it display normally, later the images don't display. I implement as follows:
pragma mark - HorizontalPickerView Delegate Methods
-
(UIView _)horizontalPickerView:(V8HorizontalPickerView *)picker viewForElementAtIndex:(NSInteger)index
{
UIDeviceImageCell *l = [[[UIDeviceImageCell alloc] initWithFrame: CGRectMake(index_80, 0, 80, 80)] autorelease];electItem *this = [imageList objectAtIndex: index];
l.image = [UIImage imageNamed: this.imagename];
return l;
}
import <UIKit/UIKit.h>
import "V8HorizontalPickerViewProtocol.h"
@interface UIDeviceImageCell : UIImageView
{
}
import "UIDeviceImageCell.h"
@implementation UIDeviceImageCell
- (void)setSelectedElement:(BOOL)selected {
}
thx