Beginner to coding.
I am on the stage of testing a part of my app on an iPad. It really works with out dramas within the simulator (which I perceive why). After I run it on an iPad, it crashes after a few cycles by any random picture gen. Leak assessments have come again high-quality. My concern is that it seems prefer it constantly opens new arrays with out closing the earlier one which simply ran.
Not fairly certain of methods to precede from right here. I’ve tried to analysis some processes to see if I can remedy it however nothing has labored, sadly.
I’d very a lot respect if anybody had the time to check this and see if there’s a resolution.
import Basis
import UIKit
class Numbers0to30ViewController: UIViewController {
@IBOutlet weak var numbersImageView: UIImageView!
var numbersImage = 0
var numbersArray = [ ]
//array consists of 31 picture literals
override func viewDidLoad() {
tremendous.viewDidLoad()
numbersArray.shuffle()
}
@IBAction func nextButtonPressed(_ sender: UIButton) {
numbersImage += 1
if numbersImage == 31 {
DispatchQueue.foremost.asyncAfter(deadline: .now() + 5) {
self.performSegue(withIdentifier: "goToNumbers30Reset", sender: self)
}
//segue goes to a separate UIView with a 'reset' and 'menu' button. 'Reset' goes again to this UIView to repeat the method, 'menu' goes again to the primary UIView.
}
}