Learn iOS with Examples, Code Snippets and Video Tutorials

Free Swift iOS and tvOS Video Tutorial – Ternary Conditional Operators in Swift 2

Free Swift iOS and tvOS Video Tutorial – Ternary Conditional Operators in Swift 2
May 24, 2016 Justin

This Swift video tutorial we’ll talk about how to shorthand some if…else statements with the ternary conditional operators. With a bool variable you can quickly make a value equal something based on two conditions. For example… let someVar = question ? answer1 : answer2 , where question is a bool variable.

This video is from CartoonSmart’s Video Tutorial Podcast, so keep in mind, this is as much for fun as it is for education. But you’ll probably learn way more than you thought!

Subscribe to our Podcast through iTunes RSS feed / Full Show Archive

Free Tutorials!

Sign up for the newsletter to get a free CartoonSmart account and track your progress in every course.

I'm cool. Sign me up!

Justin Dike is the owner and lead developer at CartoonSmart.com. He's taught hundreds of hours of game development video tutorials, covering everything from coding to art. These days he's working mostly on Swift and Sprite Kit tutorials, which often lead into highly polished iOS / tvOS Starter Kits, which require no programming at all, but are capable of making nearly any type game! Yeah, you read that write. You can also find Justin at the official CartoonSmart Podcast

0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*

Check out our premium Swift and Sprite Kit Tutorial content!

Visit CartoonSmart.com