Skip to content

Instantly share code, notes, and snippets.

View pkc456's full-sized avatar
👋
Focusing

Pardeep Kumar Chaudhary pkc456

👋
Focusing
View GitHub Profile
@A-Zak
A-Zak / uiimage_combine.swift
Last active October 30, 2021 09:11
UIImage extension to combine two images
extension UIImage {
class func imageByCombiningImage(firstImage: UIImage, withImage secondImage: UIImage) -> UIImage {
let newImageWidth = max(firstImage.size.width, secondImage.size.width )
let newImageHeight = max(firstImage.size.height, secondImage.size.height)
let newImageSize = CGSize(width : newImageWidth, height: newImageHeight)
UIGraphicsBeginImageContextWithOptions(newImageSize, false, UIScreen.mainScreen().scale)