/animal-kingdom-basic

An basic iOS app project for beginners

Primary LanguageSwift

Animal Kingdom Basics

Animal Kingdom Basics is a basic iOS app that features monkey, tiger, and elephant.

Video Walkthrough

Video Walkthrough

Before you begin

  1. Create a new iOS project
  2. Call it "Animal Kingdom Basic"
  3. Save the project
  4. Download Images

Required features and components

  • Three buttons with images of monkey, elephant, and a tiger. When user taps on either of the button, the label underneeth displays the name of the selected animal. You can download the images here.
  • A label underneeth the images that tells the user what animal was selected.
  • A segmented control with options: white, red, green, and blue. When user taps on either of the control, the background color changes appropriately.
  • A label that displays font size of the label above (that displays name of the selected animal)
  • A slider next to the font-size label that users can slide to increase or decrease the size of the above label.
  • A switch button that hides the font slider when it is on, and doesn't hide it when it is off.
  • At the start of the app, "Monkey" appears to be selected. That means that image of monkey is "monkey filled" and text of the label underneeth says "Monkey".
  • When the user selects an image of an animal, the SELECTED image should change it's own image to filled and all other button images change to unfilled mode. Ex: If I tap tiger's image, tiger's image is now filled mode and other animals (monkey and lion) appear to be outlined images.

Hints

Images

Download images for the buttons here.

Adding an image to project

Video Walkthrough

Setting image to button programatically

Video Walkthrough

Segmented Control Index

if sender.selectedSegmentIndex == 0, do something...

Updating Font

animalNameLabel.font = UIFont.systemFont(ofSize: CGFloat(sender.value))