title: iOS - int (unsigned int) maximum value is 2147483647, unsigned int doesn't work?
body: <p>the maximum value for an 32-Bit integer is: 2^31-1 = 2147483647.
  but just with negative and positive number. because the half of the number is negative.
  so the real maximum value is 2^32-1 = 4294967295. but in this case we just use positive numbers.</p>
  
  <p>ok, a normal int is both negative and positive number.
  i want to use just positive number because i want the maximum value to be: 4294967295.
  i'm going to use
  "unsigned int"
  instead of
  "int"</p>
  
  <p>but this will not work!
  the maximum value is still 2147483647.</p>
  
  <p>here is the code for a simple random number generator:</p>
  
  <pre><code>-(Action for my button) {
  
  unsigned int minNumber;
  
  unsigned int maxNumber;
  
  unsigned int ranNumber;
  
  minNumber=[self.textFieldFrom.text intValue]; //getting numbers from my textfields
  maxNumber=[self.textFieldTo.text intValue]; //Should i use unsigned intValue?
  
  ranNumber=rand()%(maxNumber-minNumber+1)+minNumber;
  
  NSString *str = [NSString stringWithFormat:@"%d", ranNumber];
  
  self.label.text = str;
  
  }
  </code></pre>
  
  <p>and this will view : 2147483647 as a maximum value.</p>
  
  <p>what's wrong? should i use unsigned intValue when i getting numbers from my textFields?</p>
  
  <p>Jonathan </p>
  
  <hr>
  
  <p>here you can read about this number. : <a href="http://en.wikipedia.org/wiki/2147483647" rel="noreferrer">http://en.wikipedia.org/wiki/2147483647</a></p>