Sorry, I thought you were trying to set userGuess.text . Are you trying to get the number from userGuess.text into num1? Then you want this:
Code:
num1 = [userGuess.text intValue];
Also, you want to use if (num1 == randomNum) , not if (num1 = randomNum) . using two == tests a value, using a single = changes a value.