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

unrecognized selector sent to instance 0x7f96bb8eede0 #47

Open
shuijinliuxi opened this issue May 25, 2015 · 1 comment
Open

unrecognized selector sent to instance 0x7f96bb8eede0 #47

shuijinliuxi opened this issue May 25, 2015 · 1 comment

Comments

@shuijinliuxi
Copy link

With the follow code:

let leftItemIcons = ["musicBarItem", "lightBarItem", "bleBarItem", "settingBarItem"]
var leftItemColors = [UIColor.black25PercentColor(), UIColor.black25PercentColor(), UIColor.black25PercentColor(), UIColor.black25PercentColor()];

var leftBar = RNFrostedSidebar(images: leftItemIcons, selectedIndices: NSIndexSet(index: 1), borderColors: leftItemColors);
leftBar.delegate = self;
leftBar.show();

It failed at the line view.imageView.image = image; in [_images enumerateObjectsUsingBlock:^(UIImage *image, NSUInteger idx, BOOL *stop)

@shuijinliuxi
Copy link
Author

I fit it with the follow:

[_images enumerateObjectsUsingBlock:^(NSString *image, NSUInteger idx, BOOL *stop) {
RNCalloutItemView *view = [[RNCalloutItemView alloc] init];
view.itemIndex = idx;
view.clipsToBounds = YES;
view.imageView.image = [UIImage imageNamed:image];
[_contentView addSubview:view];

        [_itemViews addObject:view];

        if (_borderColors && _selectedIndices && [_selectedIndices containsIndex:idx]) {
            UIColor *color = _borderColors[idx];
            view.layer.borderColor = color.CGColor;
        }
        else {
            view.layer.borderColor = [UIColor clearColor].CGColor;
        }
    }];

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