- (UIImage *)addImage:(UIImage *)image1 toImage:(UIImage *)image2 {

    UIGraphicsBeginImageContext(image1.size);

    

    // Draw image1

    [image1 drawInRect:CGRectMake(0, 0, 40, 40)];

    

    // Draw image2

    [image2 drawInRect:CGRectMake(40, 0, 40, 40)];

    

    // Draw image2

    [image2 drawInRect:CGRectMake(00, 40, 80, 40)];

    

    UIImage *resultingImage = UIGraphicsGetImageFromCurrentImageContext();

    

    UIGraphicsEndImageContext();

    

    return resultingImage;

}

相关文章:

  • 2021-12-02
  • 2022-02-09
  • 2022-01-01
  • 2022-12-23
  • 2021-11-21
  • 2021-09-11
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-17
  • 2021-06-06
  • 2022-12-23
  • 2022-02-22
  • 2022-01-02
  • 2021-06-19
相关资源
相似解决方案