Posts

Post not yet marked as solved
0 Replies
513 Views
Just upgraded to Xcode 12.4 and now I cannot invert colors on images in the simulator. Works on physical devices but not in the simulator. Problem is I NEED the simulator for required screenshots for devices I don't own. Do other have this same problem of it not working? (UIImage *)getImage:(NSString *)name background:(NSString *)background scale:(int)scale { NSLog(@"getImage: %@", name); UIImage *image = [UIImage imageNamed:name]; float w = image.size.width / scale; float h = image.size.height / scale; UIGraphicsBeginImageContextWithOptions(CGSizeMake(w, h), NO, 0); [image drawInRect:CGRectMake(0, 0, w, h)]; UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); image = newImage; if (background == nil) {return image;} // if background is light, no need to convert button color to white if (![Tools isColorDark:background]) {return image;} // convert image from black to white CIImage *coreImage = [CIImage imageWithCGImage:image.CGImage]; CIFilter *filter = [CIFilter filterWithName:@"CIColorInvert"]; [filter setValue:coreImage forKey:kCIInputImageKey]; CIImage *result = [filter valueForKey:kCIOutputImageKey]; return [UIImage imageWithCIImage:result scale:image.scale orientation:image.imageOrientation]; }
Posted Last updated
.
Post not yet marked as solved
0 Replies
503 Views
Just upgraded after running on Mojave for several years. Now with Xcode 12.3, I cannot run any simulator. [APP] architectures (arm64) include none that iPhone 12 can execute (Intel 64-bit). No matter what I try, I cannot change the architectures and have it work. It is set to "$(ARCHS_STANDARD)". Changing build active architecture changes nothing either.
Posted Last updated
.