Prime Number Calculator

Create a GUI

Text

Define your Actions and Outlets And iVars

  • Actions
    • calculatePrimeNumbers
  • Outlets
    • primeNumbers
    • errorMessage
    • fromValue
    • toValue
  • iVars
    • start
    • end

Define your helper methods...

- (void)findPrimesFrom:(int)fromValue to:(int)toValue;

- (void)startFindPrimes;

- (BOOL)isPrimeNumber:(int)number;

Add Error Handling

- (BOOL)validateInput:(int)fromValue to:(int)toValue;

Implement Different View Objects to Control the Application

  • Sliders
  • Stepper

iOS100 Exercise 3

By Alex Rodriguez

iOS100 Exercise 3

  • 1,557