GithubHelp home page GithubHelp logo

jgon / hacking-with-swift-project-8-swifty-words Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 14 KB

addTarget(), enumerate(), countElements(), find(), join(), stringByReplacingOccurrencesOfString(), property observers, range operators.

Swift 100.00%

hacking-with-swift-project-8-swifty-words's Introduction

Hacking with Swift - Project 8 - Swifty Words

Setup

  • Xcode 7.2.1
  • Swift 2.0
  • iOS 9.2
  • iPad

Topics covered

  • For loops with a condition: for ... in ... where.
  • Programmatically adding an action to a UIButton using addTarget and specifying the event .TouchUpInside.
  • Splitting a string into an array using String componentsSeparatedByString.
  • Using the enumerate to iterate over an array getting the position in the array as well as the array element (for (index, line) in lines.enumerate()).
  • Replacing occurrences of a string in a string using stringByReplacingOccurrencesOfString.
  • Trimming strings using stringByTrimmingCharactersInSet (whitespaceAndNewlineCharacterSet).
  • Looping over a range without including the upper bound of the range (for i in 0 ..< letterButtons.count). The ...operator includes the upper bound of the range.
  • Defining a property observer (didSet) to perform some logic every time the value changes. One can also use the willSet property observer to take action before the value is changed.

hacking-with-swift-project-8-swifty-words's People

Watchers

 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.