πŸ€‘ Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! πŸš€start learning today!

🌟 Dreaming of a bright future? πŸŽ“ Ask about the Treehouse Scholarship program! πŸš€

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
  • George Hawkins
    George Hawkins
    4,269 Points

    How to convert from String to Int in code 8

    Posted June 20, 2016 10:06pm by George Hawkins
    George Hawkins
    4,269 Points
    • iOS
    • Swift Functions and Optionals
    • Optionals
    • Optional Chaining

    1 Answer

  • Ian Hicks
    Ian Hicks
    3,889 Points

    XCode 7, the toInt() is not available?

    Posted October 6, 2015 4:08am by Ian Hicks
    Ian Hicks
    3,889 Points
    • iOS
    • Swift Functions and Optionals
    • Optionals
    • Optional Chaining

    1 Answer

  • julienclemencon
    julienclemencon
    1,559 Points

    Swift 2: replacing ?.toInt() with ?.int()

    Posted September 24, 2015 9:43am by julienclemencon
    julienclemencon
    1,559 Points
    • iOS
    • Swift Functions and Optionals
    • Optionals
    • Optional Chaining

    3 Answers

  • Linh Nguyen
    PLUS
    Linh Nguyen
    Courses Plus Student 984 Points

    .toInt() is longer available and it's driving me insane

    Posted September 20, 2015 2:05am by Linh Nguyen
    Linh Nguyen
    Courses Plus Student 984 Points
    • iOS
    • Swift Functions and Optionals
    • Optionals
    • Optional Chaining

    1 Answer

  • Stanley Lim
    Stanley Lim
    209 Points

    Why is 2:51 unsafe with the bang unwrapping?

    Posted September 12, 2015 3:33am by Stanley Lim
    Stanley Lim
    209 Points
    • iOS
    • Swift Functions and Optionals
    • Optionals
    • Optional Chaining

    2 Answers

  • isabelbolger
    isabelbolger
    1,412 Points

    Do not see the option of Int? toInt() for optional chaining video

    Posted August 19, 2015 10:57pm by isabelbolger
    isabelbolger
    1,412 Points
    • iOS
    • Swift Functions and Optionals
    • Optionals
    • Optional Chaining

    1 Answer

  • HaeJu Lee
    HaeJu Lee
    3,811 Points

    Question About findApt(β€œ101”)?.toInt() and ? mark for optionals

    Posted July 12, 2015 6:09pm by HaeJu Lee
    HaeJu Lee
    3,811 Points
    • iOS
    • Swift Functions and Optionals
    • Optionals
    • Optional Chaining

    3 Answers

  • William Rodriguez
    William Rodriguez
    1,923 Points

    Why is the "let" necessary in the if-let statement? Wouldn't if just work fine without it? Why make it a constant?

    Posted June 11, 2015 5:11pm by William Rodriguez
    William Rodriguez
    1,923 Points
    • iOS
    • Swift Functions and Optionals
    • Optionals
    • Optional Chaining

    1 Answer

  • Martin Adams
    Martin Adams
    1,513 Points

    There’s an error in your code at #00:48. It should read: println("\(aptNumber) is the culprit")

    Posted May 16, 2015 1:40am by Martin Adams
    Martin Adams
    1,513 Points
    • iOS
    • Swift Functions and Optionals
    • Optionals
    • Optional Chaining

    0 Answers

  • Ryan Norton
    Ryan Norton
    6,218 Points

    Why is the "?" suffix needed at all when chaining optionals?

    Posted May 4, 2015 2:50am by Ryan Norton
    Ryan Norton
    6,218 Points
    • iOS
    • Swift Functions and Optionals
    • Optionals
    • Optional Chaining

    1 Answer

  • Megan Bullington
    Megan Bullington
    6,245 Points

    In all of the videos, an optional returns "Some" and then the value. My xCode is just returning the value.

    Posted April 22, 2015 4:24pm by Megan Bullington
    Megan Bullington
    6,245 Points
    • iOS
    • Swift Functions and Optionals
    • Optionals
    • Optional Chaining

    1 Answer

  • Dana Feldman
    Dana Feldman
    4,475 Points

    Besides for the purpose of this video example of Optionals does func sendNoticeto have to be an Int?

    Posted January 10, 2015 9:29pm by Dana Feldman
    Dana Feldman
    4,475 Points
    • iOS
    • Swift Functions and Optionals
    • Optionals
    • Optional Chaining

    1 Answer

  • ryan weeber
    PLUS
    ryan weeber
    Courses Plus Student 1,082 Points

    Why can't we say if var = //optional unwrapping We can only use if let. Thank you.

    Posted January 9, 2015 9:24pm by ryan weeber
    ryan weeber
    Courses Plus Student 1,082 Points
    • iOS
    • Swift Functions and Optionals
    • Optionals
    • Optional Chaining

    1 Answer

  • Morten Engervik
    Morten Engervik
    1,420 Points

    I get this error in the example with optionals/optionals chaining:

    Posted December 1, 2014 7:09am by Morten Engervik
    Morten Engervik
    1,420 Points
    • iOS
    • Swift Functions and Optionals
    • Optionals
    • Optional Chaining

    2 Answers

  • Jason Hernandez Berland
    Jason Hernandez Berland
    1,575 Points

    Why use the ! operator?

    Posted November 21, 2014 6:16pm by Jason Hernandez Berland
    Jason Hernandez Berland
    1,575 Points
    • iOS
    • Swift Functions and Optionals
    • Optionals
    • Optional Chaining

    3 Answers

  • Burak Boysan
    Burak Boysan
    1,205 Points

    I want to reach the input of a function.

    Posted November 13, 2014 12:11pm by Burak Boysan
    Burak Boysan
    1,205 Points
    • iOS
    • Swift Functions and Optionals
    • Optionals
    • Optional Chaining

    1 Answer

  • Pierre-Emmanuel Turcotte
    Pierre-Emmanuel Turcotte
    13,670 Points

    Why no if Let unwrapper to use sendNotice() after chaining ToInt to findApt("101")?

    Posted November 10, 2014 2:56pm by Pierre-Emmanuel Turcotte
    Pierre-Emmanuel Turcotte
    13,670 Points
    • iOS
    • Swift Functions and Optionals
    • Optionals
    • Optional Chaining

    1 Answer

  • Javier Cambon Sanjurjo
    Javier Cambon Sanjurjo
    1,482 Points

    Why aren't all the types just optional by default?

    Posted October 27, 2014 4:37am by Javier Cambon Sanjurjo
    Javier Cambon Sanjurjo
    1,482 Points
    • iOS
    • Swift Functions and Optionals
    • Optionals
    • Optional Chaining

    2 Answers

  • Alex Atwater
    Alex Atwater
    2,624 Points

    What’s the difference between doing findApt(β€œβ€)?.toInt() and findApt(β€œβ€)!.toInt() Seems to do same thing...

    Posted October 12, 2014 4:05pm by Alex Atwater
    Alex Atwater
    2,624 Points
    • iOS
    • Swift Functions and Optionals
    • Optionals
    • Optional Chaining

    1 Answer

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.