Swifterswift: Rethink files structure and subspec

Created on 5 Sep 2017  路  3Comments  路  Source: SwifterSwift/SwifterSwift

Files Structure

I think this structure will make the library more modular and help people add new categories of extensions in the future

SwiftStdlib

All Swift Standard Library extensions

  • ArrayExtensions.swift
  • BoolExtensions.swift
  • CharacterExtensions.swift
  • CollectionExtensions.swift
  • DictionaryExtensions.swift
  • DoubleExtensions.swift
  • FloatExtensions.swift
  • FloatingPointExtensions.swift
  • IntExtensions.swift
  • OptionalExtensions.swift
  • SignedIntegerExtensions.swift
  • SignedNumericExtensions.swift
  • StringExtensions.swift

Foundation

All Foundation extensions

  • DataExtensions.swift
  • DateExtensions.swift
  • LocaleExtensions.swift
  • NSAttributedStringExtensions.swift
  • URLExtensions.swift

UIKit

All UIKit extensions

  • UIAlertControllerExtensions.swift
  • UIBarButtonItemExtensions.swift
  • UIButtonExtensions.swift
  • UICollectionViewExtensions.swift
  • UIColorExtensions.swift
  • UIImageExtensions.swift
  • UIImageExtensions.swift
  • UIImageViewExtensions.swift
  • UILabelExtensions.swift
  • UINavigationBarExtensions.swift
  • UINavigationControllerExtensions.swift
  • UINavigationItemExtensions.swift
  • UISearchBarExtensions.swift
  • UISegmentedControlExtensions.swift
  • UISliderExtensions.swift
  • UIStoryboardExtensions.swift
  • UISwitchExtensions.swift
  • UITabBarExtensions.swift Add tests
  • UITableViewExtensions.swift
  • UITextFieldExtensions.swift
  • UITextViewExtensions.swift
  • UIViewControllerExtensions.swift
  • UIViewExtensions.swift

AppKit

All AppKit (macOS) extensions
was Cocoa before

  • NSColorExtensions.swift
  • NSViewExtensions.swift

CoreGraphics

All CoreGraphics extensions

  • CGColorExtensions.swift
  • CGFloatExtensions.swift
  • CGPointExtensions.swift
  • CGSizeExtensions.swift

CoreLocation

All CoreLocation extensions

  • CLLocationExtensions.swift

Cocoapods Subspecs

these changes will be reflected to SwifterSwift.podspec as well, adding new subspecs for new categories and renaming Cocoa to AppKit

enhancement

Most helpful comment

What about SwiftStdlib Extensions?

Swift Standard Library

  • ArrayExtensions.swift
  • BoolExtensions.swift
  • CharacterExtensions.swift
  • CollectionExtensions.swift
  • DictionaryExtensions.swift
  • DoubleExtensions.swift
  • FloatExtensions.swift
  • FloatingPointExtensions.swift
  • IntExtensions.swift
  • OptionalExtensions.swift
  • SignedIntegerExtensions.swift
  • SignedNumericExtensions.swift
  • StringExtensions.swift

All 3 comments

What about SwiftStdlib Extensions?

Swift Standard Library

  • ArrayExtensions.swift
  • BoolExtensions.swift
  • CharacterExtensions.swift
  • CollectionExtensions.swift
  • DictionaryExtensions.swift
  • DoubleExtensions.swift
  • FloatExtensions.swift
  • FloatingPointExtensions.swift
  • IntExtensions.swift
  • OptionalExtensions.swift
  • SignedIntegerExtensions.swift
  • SignedNumericExtensions.swift
  • StringExtensions.swift

@SD10 I like SwiftStdlib :)

@SD10 @LucianoPAlmeida I updated the list above to have a SwiftStdlib section

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marcocapano picture marcocapano  路  5Comments

fanglinwei picture fanglinwei  路  3Comments

bjimenezned picture bjimenezned  路  3Comments

omaralbeik picture omaralbeik  路  5Comments

omaralbeik picture omaralbeik  路  3Comments