Skip to content

caroline608/AC-iOS-LifecycleAndControlsExercise

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

AC-iOS-LifecycleAndControlsExercise

Love Songs, Lifecycle and Controls

Step 1

We're going to create a settings menu for our love songs tableview from yesterday. If you already created that tableview, move on to step 2, if not...

a. Fork and clone this repo.

b. Create a tableview and populate it with the static array loveSongs in Song

Love Songs TableView

screen shot 2017-11-07 at 10 51 18 am

Step 2

Create a SettingsViewcontroller and hook it up to its own ViewController class. Create outlets and actions for the controls and get them working and updating their corresponding labels.

Settings Menu

screen shot 2017-11-07 at 10 51 03 am

Step 3

Create a Settings class with static variables to hold all the settings options values. You need to be able to store...

a. The maximum number or rows in the tableview

b. The case of the text, whether it be lowercase, uppercase or capitalized... maybe use an enum for this??

c. The background color of the tableViewCell, this could be a tuple of RGB. You'll get those values from the sliders.

d. Whether or not the backgroundColor of the tableViewCells should alternate between odd and even rows.

Changing Rows

Changing Case

Changing Cell Background Color

Alternating Cells

The opposite background color of the alternationg cells is gotten by creating an RGB color from one subract the slider values . e.g. if the red slider value is 0.85 then the oppsite red value will be 1 - 0.85 = 0.15.

Step 4

a. Update your Settings class from the SettingsViewController.

b. Have your TableViewController check the Settings for how to configure the cells.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 100.0%