Giter VIP home page Giter VIP logo

the-pomodoro's Introduction

The-Pomodoro

An iOS pomodoro timer app including history.

##Part 1: Tab Bar Controller

###Step 1: Add a new ViewController as your root view controller

  • Add view controllers (Timer, History) to project
  • Set each viewcontroller's tabBarItem.title and tabBarItem.image
  • Initialize a tab bar controller
  • Initialize each view controllers
  • Set viewControllers as tab bar controller viewControllers
  • Set tab bar controller as root viewcontroller of window

###Part 2: The Timer App

Our two views are going to talk to each other with notifications. When the timer runs out of time it will post "RoundCompleteNotification".
The round needs to post a "CurrentRoundNotification". When a user selects a round, or when a round completes the current round notification should trigger

###Step 2: Add the interface to the timer view controller

  • Add a label and button to the timer screen
  • Add outlets for the button and label
  • Add an action method to trigger the timer
    • note: We need to disable the button while the timer is going.

###Step 3: Count down

  • In the action method you need to use performSelector after delay to count down
  • You'll need to store the seconds and minutes and decrease the time by a second each time the method gets called.
  • When seconds and minutes are zero post the notification.

###Step 4: Add a tableview and datasource methods to the rounds view controller

  • Create a tableview property on the rounds view controller and instantiate it
  • Add the tableview to the viewcontrollers view
  • set self as datasource and delegate
  • Add a data array method (times)
  • Add datasource methods
  • Add a postMinutes method
  • In the postMinutes method post round minutes notification
  • Add didSelectRowAtIndexPath to change currentRound and reload data and post minutes

###Step 5: Add observer notifications

  • Add round view controller as observer of finished notification
    • (void)endRound:(NSNotification *)notification
  • Add Timer view controller as observer of roundMinutes notification
    • (void)newRound:(NSNotification *)notification

##Part 2: Styling the Views

###Step 6: Stylize the app

  • Update navigationBar color
  • Update navigationBar title font and text color
  • Update the tint color on the tab bar
  • Update the background color on the tab bar
  • Add images to the tableViewCells

###Black Diamond:

  • Allow the user to pause the button
  • The timer could constantly push what time it is, and the rounds have a label

the-pomodoro's People

Contributors

jkhowland avatar trm36 avatar

Watchers

James Cloos avatar  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.