Category: Swift Swift
Posted on July 6, 2016
by Steven Lipton
12 Comments
In this lesson, we’ll take a look at tab bar controllers and how to add them in the storyboard. For more on implementing them completely in code see Swift Swift: Using Tab Bar Controllers in Swift. For more on data sharing once set up… Continue Reading “Tab Bar Controllers in Xcode 8 Storyboards”
Category: Auto Layout and Size Classes, ios8, Swift Programming, Swift Swift, TutorialTags: autolayout, iPhone Programming, more, swift programming, Tab bar, tab bar icon color, Tab Bar Icons, Tab bar items, Tab bar more, Xcode, xibs in swift
Posted on July 5, 2016
by Steven Lipton
19 Comments
For most uses, a basic string works well. Normal strings have no character or paragraph formatting. They rely on the properties of the control to format them. The system only formats the full string, not parts of it. For formatting a part of a… Continue Reading “Using Attributed Strings in Swift 3.0”
Category: Swift Programming, Swift Swift, TutorialTags: Apple swift, Attributed Strings, Attributed Text, attributes, Drop Shadows, NSAttributedString, NSBackgroundColorAttributeName, NSFontAttributeName, NSMutableAttributedString, NSRange, NSShadow, NSShadowAttributeName, NSStrokeColorAttributeName, NSStrokeWidthAttributeName, swift and UI, swift programming, Swift. NSAttributedString in Swift
Posted on June 28, 2016
by Steven Lipton
27 Comments
Almost every iPhone and iPad now has a camera. Many people want to use a camera in their apps for various reasons. While you may not be building the next Instagram or Twitter, there are many places where photo documentation comes in handy. There… Continue Reading “How to Use UIImagePickerController for a Camera and Photo Library in Swift 3.0.”
Category: GUI, ios8, Swift, Swift Swift, TutorialTags: camera, crashes, info.plist, Photo, Photo Library, popover, popover in swift, popover UIBarButtonItem, UIAlertController, UIAlertController example, UIImagePicker, UIImagePickerController, UIImagePickerControllerDelegate, UIImageView
Posted on June 24, 2016
by Steven Lipton
5 Comments
What is a Dictionary Dictionaries and arrays make up the collection types of Swift. Collections are exactly what they say: a collection of values. The difference between an array and a dictionary is how you get the values in and out of the collection.… Continue Reading “How to Use Dictionaries in Swift 3.0”
Category: Swift Programming, Swift Swift, TutorialTags: .keys, .values, add dictionary, adding dictionary swift, change dictionary, compare dictionares with arrays, delete dictionary, deleting dictionary swift, dictionary optional, iterating dictionaries Swift, key, key:value, Optional Values, removeValueForkey, swift, Swift dictionaries, updateValue
Posted on February 11, 2016
by Steven Lipton
26 Comments
This will be the first in a series of lessons on persistence in iOS applications. Persistence is keep data around even if your app ends. As we’ll see in this series there are many techniques to save and read data. One Common one Apple… Continue Reading “How to Use Property Lists (.plist) in Swift”
Category: ios8, iOS9, Swift, Swift Programming, Swift Swift, TutorialTags: Apple, editing, plist, property list, reading plist, Xcode, XML
Posted on January 21, 2016
by Steven Lipton
1 Comment
Often code needs some way to describe a discrete set of cases. You might need values for breakfast lunch and dinner for example. How we configure a view might be set by one of a few choices. There are many types of UIButtons we… Continue Reading “How to Use enum and Enumerations in Swift”
Category: Swift, Swift Programming, Swift Swift, TutorialTags: Apple swift, case, enum, enumeration, games programming, IBM Sandbox, swift, swift programming, switch, Tutorial, without Mac
Posted on December 4, 2015
by Steven Lipton
Leave a Comment
While very versatile, there’s some point where every developer finds table views lacking something: the cell format is too limited. Apps like Facebook, Twitter, and Instagram don’t use simple table views. They use custom table cell formats. In this lesson, we’ll start learning how… Continue Reading “How to Use Custom Table Cells in a UITableView”
Category: GUI, iOS9, Swift, Swift Programming, Swift Swift, TutorialTags: cell, cell height, cell style, cellforrowatIndexpath, Custom table cells, estimatedHeightForRowAtIndexPath, row, row height, stack view, stack views, table cells, UITableView, UITableViewCell, UITableViewController
Posted on November 25, 2015
by Steven Lipton
2 Comments
Suppose you have a project with adaptive layout, but you hate storyboards. You’ve coded all your layout and then find something horrible: it only codes well in portrait on an iPhone. You’ve decided that some of the elements need to be in a different… Continue Reading “Using Trait Collections for Auto Layout and Size Classes”
Category: Auto Layout and Size Classes, GUI, iOS9, Swift Programming, Swift Swift, TutorialTags: changing layout, compact, compact size class, constant, constraint outlets, constraints, outlets, programatically, regualr size classs, Regular, size class, UITraitCollection
Posted on November 20, 2015
by Steven Lipton
Leave a Comment
I’m pleased to announce that my latest book Practical Auto Layout for Xcode 7 is now available in both Amazon Kindle and iBooks formats. This is an update to my earlier book Practical Auto Layout, with more material to include coverage of the iPad… Continue Reading “Auto Layout for XCode 7”
Posted on November 11, 2015
by Steven Lipton
22 Comments
Some people don’t like Interface Builder and like to code instead. Sometimes your layout is so dynamic you need to lay out in code. In either case, programmatic layout of views becomes the answer instead of auto layout. In Xcode 7 Apple introduced stack… Continue Reading “How to Add Stack Views Programmatically and (almost) avoid AutoLayout”
Category: Auto Layout and Size Classes, GUI, iOS9, Swift, Swift Programming, Swift Swift, TutorialTags: Auto Layout, autolayout, stack view, swift, UIStackView