🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! 🚀 New videos dropping every week—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
    • Community Projects
    • Live Sessions
    • 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
  • Community Projects Live Sessions 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
  • Elena Iliasova
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Elena Iliasova
    iOS Development with Swift Techdegree Student 1,739 Points

    Random Colors of button

    Posted May 19, 2020 11:03am by Elena Iliasova
    .a{fill-rule:evenodd;}techdegree
    Elena Iliasova
    iOS Development with Swift Techdegree Student 1,739 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Improving Our User Interface
    • Random Colors

    0 Answers

  • India Poetzscher
    PLUS
    India Poetzscher
    Courses Plus Student 3,821 Points

    I don't know how to fix this error! It is preventing me from being able to run my app.

    Posted May 31, 2019 2:28am by India Poetzscher
    India Poetzscher
    Courses Plus Student 3,821 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Improving Our User Interface
    • Random Colors

    1 Answer

  • Otto linden
    Otto linden
    5,857 Points

    Why does the app look like it's on a phone when viewing it as an ipad pro?

    Posted December 22, 2018 6:14pm by Otto linden
    Otto linden
    5,857 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Improving Our User Interface
    • Random Colors

    1 Answer

  • Javid Abbasov
    Javid Abbasov
    2,319 Points

    Random number generator

    Posted February 22, 2018 8:26pm by Javid Abbasov
    Javid Abbasov
    2,319 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Improving Our User Interface
    • Random Colors

    0 Answers

  • Nathalie Dory
    Nathalie Dory
    2,912 Points

    Why do you add () after declaring a property and method in a class?

    Posted January 10, 2018 9:15am by Nathalie Dory
    Nathalie Dory
    2,912 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Improving Our User Interface
    • Random Colors

    1 Answer

  • Nick Johnson
    Nick Johnson
    2,345 Points

    Why, when setting the upper bound for the random number generator, do we not have to do colors.count - 1?

    Posted November 15, 2017 7:25pm by Nick Johnson
    Nick Johnson
    2,345 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Improving Our User Interface
    • Random Colors

    2 Answers

  • valter Levander
    valter Levander
    345 Points

    The text color/tint color of my button do not change, only the view's background color does so. Any ideas?

    Posted October 20, 2017 4:47am by valter Levander
    valter Levander
    345 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Improving Our User Interface
    • Random Colors

    0 Answers

  • Prem Agrawal
    Prem Agrawal
    944 Points

    Color of the button does not changes??

    Posted August 25, 2017 4:11pm by Prem Agrawal
    Prem Agrawal
    944 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Improving Our User Interface
    • Random Colors

    3 Answers

  • Jordan Ward
    Jordan Ward
    2,395 Points

    Hey guys in my version of Xcode tint.Color is passing compiler but not doing the command in the app.

    Posted August 24, 2017 2:58am by Jordan Ward
    Jordan Ward
    2,395 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Improving Our User Interface
    • Random Colors

    1 Answer

  • Clayton Novotney
    Clayton Novotney
    1,341 Points

    "Installation Failed Invalid Argument"

    Posted July 7, 2017 1:43am by Clayton Novotney
    Clayton Novotney
    1,341 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Improving Our User Interface
    • Random Colors

    1 Answer

  • Dmitry Pavlovsky
    Dmitry Pavlovsky
    2,502 Points

    Differente ways?

    Posted May 4, 2017 9:27am by Dmitry Pavlovsky
    Dmitry Pavlovsky
    2,502 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Improving Our User Interface
    • Random Colors

    1 Answer

  • Bastian Petersson
    Bastian Petersson
    9,164 Points

    App crashes when I run it

    Posted April 1, 2017 12:50pm by Bastian Petersson
    Bastian Petersson
    9,164 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Improving Our User Interface
    • Random Colors

    1 Answer

  • Jose Wences
    Jose Wences
    4,596 Points

    Build a Simple iphone app with swift 3. Video Random Colors. Run time error.

    Posted December 29, 2016 12:09am by Jose Wences
    Jose Wences
    4,596 Points
    • iOS
    • Build a Simple iPhone App with Swift
    • Improving Our User Interface
    • Random Colors

    0 Answers

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.