You've probably seen menus that pop out of the side of an app, but do you know how to make one? With the knowledge of some simple code you too can add these to your application using auto layout. If you take a look at the example file, I've set up a storyboard for you. …
Layout iPad Landscape and Multitasking Apps
Note:You can find a video of this tip here on LinkedIn Learning If there's one thing in auto layout that drives me nuts it is laying out for landscape different than portrait on an iPad. Phones are easy since the class sizes are different for portrait and landscape. For all phones, if I have a …
Continue reading "Layout iPad Landscape and Multitasking Apps"
Where is Update Frames in Xcode 8.1?
A tech author's work is never done. As soon as he or she completes manuscript and gets it published, the manuscript almost immediately becomes obsolete. In my case, Practical Autolayout for Xcode 8 went obsolete a day before I published, but I had no idea about a major change in Xcode 8.1. Until Xcode 8.1, if you …
Tab Bar Controllers in Xcode 8 Storyboards
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 in the storyboard, see Passing Data in Tab Bar controllers The …
Continue reading "Tab Bar Controllers in Xcode 8 Storyboards"
How to Add Stack Views Programmatically and (almost) avoid AutoLayout
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 views. In an earlier post, I introduced stack views in Interface …
Continue reading "How to Add Stack Views Programmatically and (almost) avoid AutoLayout"
Swift Swift: Using NSTimer to Make a Timer or Alarm
With the launch of the Apple Watch it's time for timers in iOS and WatchKit. Learning to use timers is a very important skill for most developers. There are many places we need to schedule regular intervals of time to do things. In my WatchKit series I'm writing a workout interval timer which tells the …
Continue reading "Swift Swift: Using NSTimer to Make a Timer or Alarm"
Tab Bar Controllers in Storyboards
[Updated to Swift 2.0/iOS9 9/21/15 SJL] While Navigation controllers often have the limelight when it comes to Xcode controllers, Tab Bar controllers are great for independent tasks in the same app or for different ways of working with the same model. In this lesson, we’ll take a look at tab bar controllers and how to …
Basic Auto Layout: A Practical View for Beginners
Note: When I originally posted the Basic Auto Layout video on YouTube, I recorded it live and did not make a script I could post underneath it. This post makes the same UI as the video, but with a few differences in depth of material and process to illustrate how to handle autolayout errors and …
Continue reading "Basic Auto Layout: A Practical View for Beginners"
Auto Layout and Size Classes: The Regular Size and Lining up Buttons Evenly
In the conclusion of our series on auto layout, we'll discuss the regular size for iPads and one side of the iPhone 6 plus. We'll make a line of evenly spaced buttons using auto layout, first for the iPad, then again for the iPhone 6 plus in landscape with its odd regular width, compact height …
Continue reading "Auto Layout and Size Classes: The Regular Size and Lining up Buttons Evenly"
Proportional Sizes in Autolayout
Transcript Welcome to this quick lesson on auto layout and proportional spacing of elements. In the previous videos, we used equal widths to set the spacing for various elements in auto layout. But what if you want the sizes to be different? For example, what if in the app we are working with the buttons …