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

🤑 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

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

  • 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
    • Showing results for:
    • iOS
    • Build a Simple iPhone App with Swift
    • Improving Our User Interface
    • Random Colors
    • Close
  • 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 on May 19, 2020 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 on May 31, 2019 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 on Dec 22, 2018 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 on Feb 22, 2018 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 on Jan 10, 2018 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 on Nov 15, 2017 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 on Oct 20, 2017 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 on Aug 25, 2017 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 on Aug 24, 2017 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 on Jul 7, 2017 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 on May 4, 2017 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 on Apr 1, 2017 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 on Dec 29, 2016 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.