Category: Swift Swift
-
Why Stack Views Are Your Best Friend If You Hate Auto Layout
If you hate auto layout, you may be surprised to learn Apple does too. In Xcode 7 Apple introduced a new way to work with constraints called stack views. Stacks are containers that keep views aligned automatically. Originally announced as a lazy man’s auto layout, you do need to understand auto layout to use it […]
-
Why your Web View Doesn’t Work in iOS9 — and what to do about it
While updating my tutorial for UIWebView I came across a problem I had heard about but had not experienced. I had even heard a claim that a lot of apps are broken or rejected because of this. Apple has increased security on web accesses, and it does crash a web view rather quickly. I’m going […]
-
How to Make Drill-Down Tables in Swift
Table views are a lot like potato chips: You can’t have just one. Often, table views relate to each other in what is often referred to as a drill-down. Drill downs typically take the selected data and provide another list in a table about the selection. It creates a hierarchical selection. You might have a […]
-
Swift Swift: Making Background Images, Small Images and Custom UIViews with Autolayout
For those who have worked a bit with auto layout, there are two topics that seems to be a real challenge: using a custom UIView, especially when using Core Graphics , and displaying photos either in the foreground or as a background. Both suffer from similar problems. When changing device or changing orientations they are […]
-
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 […]
-
Swift Swift: View Controllers Now Available for iBooks
It was hard to tell if the cheers of joy or cries of fear were louder when Swift was announced, the next generation programming language to provide rapid development and more error free code than its predecessor Objective-C. There is nothing to fear. Grabbing the best from many different languages Swift makes for a completely […]