Tag: iphone

Launch an Alert from a Closure Safely

Your app can get into problems when you launch UI from others threads, such as closures.  For example, you  might have an app that going to ask for permissions for things like photos, notifications, or location data. The system usually handles those, but you…

Replace Segmented Controls with Button Arrays

You’ve probably used the Segmented control before like this one It’s great for some simple uses but lacks flexibility. Besides using only text or single color icon, it doesn’t work in vertical or other arrangements. Let’s look at another solution: Using Button arrays.  In…

Embed Table Views

Here’s an app I started from the downloaded example file. It is a restaurant check with a total, but I have to press the Order button to see the details in a table view on the next view controller. That button is a waste…

Animate With a Map Camera

In an earlier tip, I showed you how to make a map in iPad Playgrounds. Let’s learn how to animate those maps, doing a flyover of Michigan avenue in Chicago from The former home of Chess Records at 2120 South Michigan Avenue (immortalized in…

A Developer Preview of WWDC 2018

We are once again getting close to the time for Apple’s World Wide Developers conference, and like every year, the press is busy trying to predict and preview what is ahead for the first week in June. Once again, they will completely miss the…

Introducing Core Motion: Make A Pedometer

Apple packed a lot of sensors into the small packages that are iOS devices. You as a developer can detect movement in three dimensions, acceleration, rotations, and impact and use those in your applications. All of this brought to your application in the CoreMotion framework. CoreMotion…

Swift Swift: Using Auto Layout with Size Classes

Last week we looked at the basics of auto layout, this week, we learn Diagonal Control Drag Using the layout error  panel for misplaced layouts Introduce Size Classes Make a different layout for iPhone in portrait with Size Classes Transcript Hello, I’m Steve from…

Swift Swift: Using Color and UIColor in Swift Part 1: RGB

[Updated to Swift 2.0/iOS9.0 9/18/15 SJL – errors corrected 11/20/15] I’m color blind, and that makes me a very good person to teach you about color and UIColor.  I’ve painted for many years and my color blindness does not detract but actually helps me…

SlippyFlippy 1.1: Adding a Fading-in and out Label with Background in SpriteKit

Today we have a bug to deal with in SlippyFlippyPenguin. There are a two reports of when a user selects the hard skill level  the game  immediately goes to game over. I cannot find anything that is different in the code to account for…

SlippyFlippy 1.1: Making a High and Low Score Indicator

This is the first of my improvements to the SlippyFlippy penguin game.  While this may not make sense since I have not posted all the game code yet, it might help those trying to come up with some of these solutions for their own…