SwifterSwift v3.2.0 Release Notes

  • API Breaking

    • Swift 3.2
      • Code has been updated to Swift 3.2; please use v3.1.1 if you are still using Swift 3 or Xcode 8
    • SwifterSwift
      • userDefaults is deprecated, use Apple's UserDefaults.standard instead.
      • object(forKey: String) is deprecated, use Apple's UserDefaults.standard.object(forKey: _) instead.
      • string(forKey: String) is deprecated, use Apple's UserDefaults.standard.string(forKey: _) instead.
      • integer(forKey: String) is deprecated, use Apple's UserDefaults.standard.integer(forKey: _) instead.
      • double(forKey: String) is deprecated, use Apple's UserDefaults.standard.double(forKey: _) instead.
      • data(forKey: String) is deprecated, use Apple's UserDefaults.standard.data(forKey: _) instead.
      • bool(forKey: String) is deprecated, use Apple's UserDefaults.standard.bool(forKey: _) instead.
      • array(forKey: String) is deprecated, use Apple's UserDefaults.standard.array(forKey: _) instead.
      • dictionary(forKey: String) is deprecated, use Apple's UserDefaults.standard.dictionary(forKey: _) instead.
      • float(forKey: String) is deprecated, use SwifterSwift's UserDefaults.standard.float(forKey: _) instead.
      • set(_ value: Any?, forKey: String) is deprecated, use Apple's UserDefaults.standard.setValue(_, forKey: _) instead.
    • Int
      • Property romanNumeral is now a method.
    • String
      • Property lines is now a method.
      • Property mostCommonCharacter is now a method.
      • Property reversed is now a method.
      • Property unicodeArray is now a method.
      • Property words is now a method.
      • Property wordCount is now a method.
    • UICollectionView
      • Property numberOfItems is now a method.
    • UITableView
      • Property numberOfRows is now a method.
    • UIViewController
      • Removed navigationBar that was causing app to crash, thanks to drewpitchford for reporting in #243.

    โœจ Enhancements

    • New Date extensions
      • added secondsSince(_ date: Date) method to get a number of seconds between two dates.
      • added minutesSince(_ date: Date) method to get a number of minutes between two date.
      • added hoursSince(_ date: Date) method to get a number of hours between two dates.
      • added daysSince(_ date: Date) method to get a number of days between two date.
      • added isInThisYear property to check if the date is in the current year.
      • added isInThisMonth property to check if the date is in the current month.
      • added isInThisWeek property to check if the date is in the current week.
    • New URLRequest extensions
      • added init?(urlString: String) fallible initializer create a URLRequest from URL string.
    • New UIWebView extensions
      • added loadURL(_ url: URL) method to load a URL.
      • added loadURLString(_ urlString: String) method to load a URL string.
    • 0๏ธโƒฃ New UserDefaults extensions
      • added subscript(key: String) method to get values from UserDefaults using the [] operator.
      • added float(forKey key: String) method to get a Float value from UserDefaults.
      • added date(forKey key: String) method to get a Date value from UserDefaults.
    • ๐Ÿ‘Œ Improved file structre, as in #236
    • ๐Ÿ‘Œ Improved README
      • Removed unnecessary description in Installation section
      • Updated List of All Extensions section to match the new file structure.

    ๐Ÿ›  Bugfixes

    N/A