From 353d72cafef91ec57ac9fbd3f6f10964190c3c91 Mon Sep 17 00:00:00 2001 From: Roman Podymov Date: Sun, 8 Oct 2023 15:02:49 +0200 Subject: [PATCH] KICamera is nil when using CocoaPods --- KIImagePager/KIImagePager/KIImagePager.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/KIImagePager/KIImagePager/KIImagePager.m b/KIImagePager/KIImagePager/KIImagePager.m index 4928cac..3251b54 100644 --- a/KIImagePager/KIImagePager/KIImagePager.m +++ b/KIImagePager/KIImagePager/KIImagePager.m @@ -127,7 +127,8 @@ - (void) initalizeImageCounter _imageCounterBackground.layer.cornerRadius = 5.0f; UIImageView *icon = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 18, 18)]; - [icon setImage:[UIImage imageNamed:@"KICamera"]]; + UIImage* image = [UIImage imageNamed:@"KICamera" inBundle:[NSBundle bundleForClass:[KIImagePager class]] compatibleWithTraitCollection:nil]; + [icon setImage:image]; icon.center = CGPointMake(_imageCounterBackground.frame.size.width-18, _imageCounterBackground.frame.size.height/2); [_imageCounterBackground addSubview:icon];