It keeps showing Cannot assign value of type'Int' to type 'UILabel' How do you fix this.
How Do You Assign Int To UILabel
When you show your code, please show it as text using Code Block. With showing easily testable code, more readers would try to solve your issue.
And in Swift, only type names start with Capital letter. Score or ScoreButton are not Swifty names.
And one more, if TestViewController is actually a subclass of ViewController, it might not be appropriate to instantiate it like TestViewController(). This may cause many critical issues.
We need to guess some parts of your code (you are not showing how score of TestViewController is declared), but according to the error message, you may need to write something like this:
        Score.text = String(newScore.score)
When you want to change the content text shown in a UILabel, you need to change the property text, not UILabel itself.
And, Swift is a strictly typed language. When newScore.score is Int, you need to convert it to String explicitly.
Using String.init(_:) is one way to convert Int to String.
You could also change your TestViewController to return a String.
This name TestViewController is really confusing. Do you create a ViewController here as the name suggests. A name like testScore would be more appropriate (starting with lowerCase).
Could you show TestViewController func ?
The test...controller