Snapping Stepper – A Swift UI Component Combining A Stepper With A Slider

SnappingStepper is an open source ui component from Yannick Loriot that provides a custom stepper component with an integrated slider.

SnappingStepper allows you to customize the look of the stepper with a wide variety of options (shape, colors, fonts, size), and users can use the integrated slider to quickly go through values without needing to click through each number.

Here’s an image from the readme showing some custom steppers created with SnappingStepper:

SnappingStepper

You can find SnappingStepper on Github here.

A great stepper component.

Original article: Snapping Stepper – A Swift UI Component Combining A Stepper With A Slider

©2016 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Formatting – Swift Library For Functional Type Safe String Formatting

Formatting is an open source Swift library that allows you to perform functional string formatting, and adds type safety.

Formatting utilizes a syntax similar to common print formatting statements, but allows you to avoid common errors that can occur such as when a string is null or optional, and also allows you to compose formatters which can then be used as functions.

Created string formats can be used functionally like in this example from the readme:

let greet =
  format("Hello, " % string % "!")

greet("world")                         // Hello, world!

You can find Formatting on Github here.

A nice Swift string formatting library.

Original article: Formatting – Swift Library For Functional Type Safe String Formatting

©2016 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

FlightAnimator – Swift Animation Library With 31 Parametric Curves And Spring/Decay Animations

FlightAnimator is an open source library from Anton Doudarev built upon CoreAnimation providing a feature rich natural animation engine with a clean Swift based syntax.

FlightAnimator supports 31 different parametric curves, spring and decay animations, supports animation of a wide number of view properties, a chainable blocks based syntax, cached animations and more.

This video clip from Anton shows FlightAnimator in action:

Animate like Jesus using FlightAnimator's blocks based syntax https://t.co/zEmOmH1ai5 #ios #iosdev #swiftlang #swift pic.twitter.com/VBikxdXBpF

— Anton (@AntonTheDev) June 29, 2016

You can find FlightAnimator on Github here.

A nice library for View animation.

Original article: FlightAnimator – Swift Animation Library With 31 Parametric Curves And Spring/Decay Animations

©2016 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Willow – A Swift Logging Library With A Number Of Great Features

Willow is an extensive Swift based logging library with a number of great features from Nike Inc.

Some of the features included with Willow are:

  • Simple to use syntax using closures
  • Different log levels
  • Color formatted long
  • Multiple simultaneous writers
  • Thread safe capabilities and shared locks and queues between multiple writers
  • Custom formatters

You can find Willow on Github here.

A nice logging library for Swift developers.

Original article: Willow – A Swift Logging Library With A Number Of Great Features

©2016 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

LayoutKit – Swift Library Providing A Higher-Performance Auto Layout Alternative

LayoutKit is an open source interface layout library from LinkedIn that was created to provide increased performance over the iOS SDK’s auto layout for complex layouts in scrollable views.

LayoutKit is as fast as manually laying out code, and considerably faster than auto layout, provides caching for increased performance, and layouts can be created within background threads.

LayoutKit syntax is clean, and similar to flexbox – here is a code snippet from the readme:

let image = SizeLayout<uiimageview>(width: 50, height: 50, config: { imageView in
    imageView.image = UIImage(named: "earth.jpg")
})

let label = LabelLayout(text: "Hello World!", alignment: .center)

let stack = StackLayout(
    axis: .horizontal,
    spacing: 4,
    sublayouts: [image, label])

let insets = UIEdgeInsets(top: 4, left: 4, bottom: 4, right: 8)
let helloWorld = InsetLayout(insets: insets, layout: stack)
helloWorld.arrangement().makeViews(inView: rootView)

You can find LayoutKit on Github here.

A nice high performance view layout library.

Original article: LayoutKit – Swift Library Providing A Higher-Performance Auto Layout Alternative

©2016 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Stranger than fiction

When I published my first novel, CHANGER, six days ago, a part of my mind was focused on the following day’s UK referendum on membership of the European Union. My wife and I had already voted by post, and we’re both strongly in the Remain camp — like the majority of people here in Scotland.

Much of the UK didn’t believe that a Leave result was a real possibility — clearly including the Westminster government. No plan in place, and no response ready. When that result nonetheless materialised on Friday morning, there was shock across all four nations, and beyond. The currency’s value fell by an unprecedented amount, wiping hundreds of billions from British assets in the space of only a couple of hours. There was anger, and disbelief, and a palpable sense of regret. Never in living memory was the United Kingdom more divided.

Continue reading “Stranger than fiction”

Tutorial: Converting Swift Any Structs To JSON Quickly Using A Protocol And The Reflection API

NSJSONSerialization allows you to easily convert an NSArray or NSDictionary to JSON, but does not work directly with Swift structs.

Emil Loer has written a nice tutorial about how you can quickly convert a Swift struct to JSON by using a protocol and the Swift Reflections compatible with NSJSONSerialization , and also how you can easily go a step further so that you can easily serialize data types that are not supported by NSJSONSerialization such as NSDate.

You can find the tutorial over on the Codelle website.

A nice guide on how you can use Swift features to very cleanly convert Swift structs to JSON.

Original article: Tutorial: Converting Swift Any Structs To JSON Quickly Using A Protocol And The Reflection API

©2016 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Swift Link Preview – Open Source Component That Neatly Displays URL Previews

Swift link preview is an open source component from Leonardo Cardoso that allows you to very easily display URL previews.

Swift link preview will grab the title, text, and images from a link, and layout everything neatly in the preview and place the results in a dictionary. An example is included.

This image shows Swift link preview in action:

SwiftLinkPreview

You can find the component on the Leocardz website.

A great Swift component for URL previews.

Original article: Swift Link Preview – Open Source Component That Neatly Displays URL Previews

©2016 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.