Join Todd Perkins for an in-depth discussion in this video Teacher's guide: Overview of variables and built-in functions, part of Teach Kids Programming with iOS.
Remember this movie, is just for you. So if your student is following along right now, have them do something else for just a minute. I'm going to be speaking quickly about what we're covering in this chapter, and about what you can do to prepare for it. In this chapter we're going to be looking at variables and functions. The data types that we'll be working with are NS string and NSDate primarily. We'll also be using NSDate formatter, and NSMutableDictionary, and a simple UI label. The app that we're making is a lunch menu.
It shows a person's name, formats the date by grabbing the day of the week, and using an NSMutableDictionary, grabs the appropriate lunch menu item for the day of the week. It displays in UI labels, the day of the week and what the person is having on that day. You'll need to be familiar with NSDateFormatters, string from date method, and NSMutuableDictionary's object for key method. So if you feel like you need to brush up on those, you can look at the documentation for NSString, NSDate, and of course NSDate formatter if you'd like.
I'm not going to be discussing the need for semicolons in this chapter, but if your student asks questions about it or you feel the need to explain it, then you can. At the end of the chapter we're going to be doing a challenge using NSStrings, uppercase string method. So again, you can look that up if you'd like in the documentation. For now, open up the Lunch Menu project in the Chapter 01 folder. And have lynda.com open in your browser so you can easily switch between the video and the project.
Remember that your student will learn better, if they get to type on the keyboard. Your role is primarily to get them unstuck whenever they get stuck. Allowing them to make mistakes and try to fix them on their own will help them learn more quickly. So now with all that said, let's move forward through this chapter.
- Teacher's Guide: Introduces the concepts in the chapter and preps the adult on places where the student might get stuck
- Try It: Immediately engages the student, showing working code in action
- Check It Out: Encourages the adult and student to engage with and edit some existing code
- The Facts: A lecture for the student to watch
- Extend It: An exploration of expanded and extended concepts
- Challenge: A hands-on coding challenge for the student
- Solution: A step-by-step solution presented by the author
This course is designed to help you, an expert, help a beginner learn about the code, logic, and interface elements that lie behind iOS apps and games. The structured curriculum supports those who have a solid understanding of the iOS SDK, but don't necessarily know how to teach it effectively to kids.