Reputation: 2232
I am upgrading my app to use iOS 13. I have been using a UIWindow to add image to the current screen. However in ios 13 the image will appear, but then disappear straight away. I tried building in previous version, which is ios 12.2, and it's working fine.
this is my code:
UIWindow *currentWindow = [UIApplication sharedApplication].keyWindow;
UIImage *image = [UIImage imageNamed:@"test_badge" inBundle:VTBundle compatibleWithTraitCollection:nil];
UIImageView *badgeImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, [currentWindow bounds].size.height-115, 115, 115)];
badgeImageView.tag =100101;
badgeImageView.image = image;
[currentWindow addSubview:badgeImageView];
Upvotes: 2
Views: 638