Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create image selector using the V8HorizontalPickerView #5

Open
fusjh2o opened this issue May 6, 2012 · 0 comments
Open

create image selector using the V8HorizontalPickerView #5

fusjh2o opened this issue May 6, 2012 · 0 comments

Comments

@fusjh2o
Copy link

fusjh2o commented May 6, 2012

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
{

}

@EnD

import "UIDeviceImageCell.h"

@implementation UIDeviceImageCell

  • (void)setSelectedElement:(BOOL)selected {
    }

@EnD

thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant