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

placeholder的照片, 最好用UIColor畫一個出來 #2

Closed
ipalm0423 opened this issue Mar 24, 2016 · 3 comments
Closed

placeholder的照片, 最好用UIColor畫一個出來 #2

ipalm0423 opened this issue Mar 24, 2016 · 3 comments

Comments

@ipalm0423
Copy link

使用者若直接把.h輸入進來,沒有輸入到placeholder的照片,就會發生錯誤

  • (void)setImageArray:(NSArray _)imageArray{
    _imageArray = imageArray;
    _images = [NSMutableArray array];
    for (int i = 0; i < imageArray.count; i++) {
    if ([imageArray[i] isKindOfClass:[UIImage class]]) {
    [images addObject:imageArray[i]];
    } else if ([imageArray[i] isKindOfClass:[NSString class]]){
    *
    [_images addObject:# [UIImage imageNamed:@"placeholder"]];
@codingZero
Copy link
Owner

@ipalm0423 占位图片跟文件都是放在同一个文件夹下的,无论使用cocoapods导入还是手动拖入XRCarouselView文件夹,图片都会跟着一起导入,应该不会出现你说的那个问题

@ipalm0423
Copy link
Author

可能是我直接拉取程式(.h, .m的關係)

@ipalm0423
Copy link
Author

或許也可以多個property 給使用者自選placeholder

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

2 participants