Skip to main content

Point-Free

Point-Free is a video series that explores advanced topics in Swift programming. Hosted by Brandon Williams and Stephen Celis, it covers both abstract ideas and practical concepts to help developers improve their Swift skills through in-depth video tutorials, code examples, and downloadable Swift playgrounds.

Details

URL: 🔗 https://www.pointfree.co

Authors: Brandon Williams and Stephen Celis

Complexity Levels:

  • Beginner: 10%
  • Intermediate: 30%
  • Advanced: 60%

Frequency of Posting: Weekly

Types of Content:

  • Videos: 70% (In-depth video tutorials)
  • Articles: 20% (Accompanying blog posts)
  • Interactive Content: 10% (Playground downloads and examples)

Additional Features:

  • Newsletter: Available for regular updates and news.
  • Collections: Curated series of videos on specific topics.
  • Free Episodes: Access to select free episodes and resources.
Visit Point-Free


UIKit

🔵 UIKit Styling with Functions

This blog post explores various approaches to styling UI components in UIKit, focusing on the composability and reusability of styles. It introduces different methods, including UIAppearance, subclassing, object composition, and function composition, each with practical examples. These techniques aim to solve common styling problems in iOS development by enhancing flexibility and reducing redundancy.

Details

URL: 🔗 https://www.pointfree.co/episodes/ep3-uikit-styling-with-functions

Published: February 12, 2018

Authors: Point-Free

Tags:
UIKit, iOS Development, Swift, UI Styling

Key Points

  • UIAppearance: A protocol that allows reusable styling by configuring view properties at the class level.
  • Subclassing: A common approach to manage reusable styles by creating base classes and inheriting them.
  • Object Composition: Preferring composition over inheritance by defining reusable styles through static properties.
  • Function Composition: Using functions to create reusable and composable styles, solving the diamond inheritance problem.

Summary of Contents

  • Introduction: Overview of the abstract concepts covered in previous episodes and their application to UIKit.
  • UIAppearance: Explanation of how UIAppearance works and its limitations.
  • Subclassing: Discussion of subclassing as a solution for reusable styling, including examples of base and specialized buttons.
  • Object Composition: Demonstrates the use of static properties to achieve composition over inheritance.
  • Functions: Introduction to using functions for styling, leading to more flexible and reusable code.
  • Function Composition: Details on composing functions to create complex, reusable styles without relying on inheritance.

Additional Resources

  • 🔗 Episode on Side Effects: Explores the concept of side effects in Swift and introduces function composition.
  • 🔗 Algebraic Data Types: The next episode that discusses algebraic data types and their use in Swift.
Read Full Article