Giter Club home page Giter Club logo

ac-ios-lifecycleandcontrolsexercise's Introduction

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.

ac-ios-lifecycleandcontrolsexercise's People

Contributors

benstone1 avatar caroline608 avatar seymotom avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.