I am looking to create an app I have already made for Android for iOS. I have a user class in the Android application, but I am not sure on how to do this for iOS. The class in android is as follows:
public class User {
protected int score;
public User() {
score = 0;
}
public long getScore() {
return score;
}
public User getScore(int score) {
this.score = score;
return this;
}
public int changeScore(int deltaScore) {
this.score += deltaScore;
return this.score;
}
}
You need to switch languages. You won’t be able to use this exact same class in iOS. You will have an Objective-C class that will have a header that looks like this:
And a definition file that will look like: