Tag: string

Strings in Swift: Going back to BASICs

A few tips ago, we went under the hood with unicode Characters and their relationship to the Swift String type. For most, that’s great theory, but how does it apply to strings, not characters? When I started programming back in the 1980’s, I had… Continue Reading “Strings in Swift: Going back to BASICs”

Swift Strings Are Not C Strings or NSStrings

In many popular programming languages strings are little more than an array of characters, often referred to as C strings since C was one of the first languages to take this approach to strings. As we learned in the last post, with Swift’s use… Continue Reading “Swift Strings Are Not C Strings or NSStrings”

Unicode Characters in Strings

Special characters like emoji, accents, and symbols in your strings are easier to get than you think. This week, we’ll talk about how using Unicode characters in Swift Strings. Open the exercise file and you’ll find a project which we’ll use for this. I… Continue Reading “Unicode Characters in Strings”

Time Picker Part 2: Strings to Time Intervals

In the last tip,  I showed you how to use UIPickerControllers to make a time interval input. What I didn’t show you is how to output that. In this tip I’ll show you how to read and convert data from a picker that has… Continue Reading “Time Picker Part 2: Strings to Time Intervals”

Parsing Strings from Time and Fractions to Doubles

This week’s lesson covers a topic the I left off on last week’s lesson, but can be used outside that context. I thus wanted to cover it separately. Last week I showed you how to use a UIPickerView to input numbers with a lot less validation.… Continue Reading “Parsing Strings from Time and Fractions to Doubles”

Swift Swift: Using Dates and the UIDatePicker in Swift

When you set an appointment in the calendar app there is a control used for time measurements called the UIDatePicker. While not one of the most popular controls, it is very handy for working with dates. In this lesson we’ll find out how easy… Continue Reading “Swift Swift: Using Dates and the UIDatePicker in Swift”