I'm using this GitHub project https://github.com/PaoloCuscela/Cards, and I have two view controllers with 14 cards each . Each card is declared like this in the view did load function :
let card = CardHighlight(frame: CGRect(x: 10, y: 30, width: 200 , height: 240))
card.backgroundColor = UIColor(red: 0, green: 94/255, blue: 112/255, alpha: 1)
card.icon = UIImage(named: "flappy")
card.title = "Welcome \nto \nCards !"
card.itemTitle = "Flappy Bird"
card.itemSubtitle = "Flap That !"
card.textColor = UIColor.white
card.hasParallax = true
let cardContentVC = storyboard!.instantiateViewController(withIdentifier: "CardContent")
card.shouldPresent(cardContentVC, from: self, fullscreen: false)
view.addSubview(card)
When I run my app on the simulator it is fine , but when running on my iPhone 6, if I open more that 5 cards at a time it crashes and it gives me error "Thread 1: EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=650 MB, unused=0x0)".How should I fix this ?