import UIKit struct FormatFrameModel { var formatTitle: String var formaDetails: [FormatFrameCVModel] } struct FormatFrameCVModel { var titleName : String var image : UIImage var imgRatio: CGSize var isRadius: Bool? init(titleName: String, image: UIImage, imgRatio: CGSize, isRadius: Bool = false) { self.titleName = titleName self.image = image self.imgRatio = imgRatio self.isRadius = isRadius } } struct AllFormatFrameModel { var objectsArray = [ FormatFrameModel( formatTitle: "Standard", formaDetails: [ FormatFrameCVModel(titleName: "Square", image: UIImage(named: "standard_square")!, imgRatio: CGSize(width: 1, height: 1) ), FormatFrameCVModel(titleName: "Story", image: UIImage(named: "standard_story")!, imgRatio: CGSize(width: 9, height: 16) ), FormatFrameCVModel(titleName: "Full", image: UIImage(named: "standard_full")!, imgRatio: CGSize(width: 3, height: 4) ), FormatFrameCVModel(titleName: "Profile", image: UIImage(named: "standard_profile")!, imgRatio: CGSize(width: 1.0, height: 1.0), isRadius: true ), FormatFrameCVModel(titleName: "Social Landscape", image: UIImage(named: "standard_social_lands")!, imgRatio: CGSize(width: 16, height: 7) ), FormatFrameCVModel(titleName: "Landscape", image: UIImage(named: "standard_landscape")!, imgRatio: CGSize(width: 16, height: 12) ) ] ), FormatFrameModel( formatTitle: "Instagram", formaDetails: [ FormatFrameCVModel(titleName: "Square", image: UIImage(named: "insta_square")!, imgRatio: CGSize(width: 1, height: 1) ), FormatFrameCVModel(titleName: "Story", image: UIImage(named: "insta_story")!, imgRatio: CGSize(width: 9, height: 16) ), FormatFrameCVModel(titleName: "Full", image: UIImage(named: "insta_full")!, imgRatio: CGSize(width: 4, height: 5) ), FormatFrameCVModel(titleName: "Profile", image: UIImage(named: "insta_profile")!, imgRatio: CGSize(width: 1, height: 1), isRadius: true ), FormatFrameCVModel(titleName: "Landscape", image: UIImage(named: "insta_landscape")!, imgRatio: CGSize(width: 16, height: 9) ) ] ) ] } // MARK: -Use model - var formatFrameModel = FormatFrameModel() var formatFrameCVModel = [FormatFrameCVModel]()