Skip to content

Releases: mac-cain13/R.swift

1.0.1

14 Jan 21:34
Compare
Choose a tag to compare

Fixed issues:

  • Validatable collision, since it's quite a common name R.swift now states explicitly it means the one in the R.swift.Library
  • Imports where missing when the module was only used in the generated code in a inferred way
  • The code to call the _R.validate() function was always generated, it's now conditional and only generated when needed

1.0.0

13 Jan 13:28
Compare
Choose a tag to compare

Breaking changes:

  • iOS 7 support is dropped, use R.swift 0.13 if you still have to support it.
  • Generated code now depends on the R.swift.Library, CocoaPods users don't need to do anything. Manual installation users need to include this library themselves, see the readme for instructions.
  • In general; properties that created new stuff are now functions to represent better that they actually create a new instance.
    • R.image.settingsIcon changed to R.image.settingsIcon()
    • R.file.someJson changed to R.file.someJson()
    • R.storyboard.main.initialViewController changed to R.storyboard.main.initialViewController()
    • R.storyboard.main.someViewController changed to R.storyboard.main.someViewController()
  • In general; Where you needed to use .initialize() to get the instance, a shorter function is available now:
    • R.storyboard.main.initialize() changed to R.storyboard.main()
    • R.nib.someView.initiate() changed to R.nib.someView()
  • Nib root view loading changed from R.nib.someView.firstView(nil, options: nil) to R.nib.someView.firstView(owner: nil)
  • Typed segue syntax changed from segue.typedInfoWithIdentifier(R.segue.someViewController.someSegue) to R.segue.someViewController.someSegue(segue: segue)
  • Runtime validation changed:
    • R.validate() now throws errors it encounters
    • R.assertValid() asserts on errors and only performs action in a debug/non-optimized build
    • For regular use cases using R.assertValid() is recommended

Major features and fixes:

  • Writing extensions for R.swift generated code is possible by using the types from the new R.swift.Library
  • Improved importstatements, R.swift will detect modules that you use and import them in the generated file.
  • Improved error reporting, on incorrect calls to the rswift binary as well as during project parsing
  • UITraitCollection can be specified when loading images
  • The String based path as well as the NSURL of a file can now easily be accessed thanks to an overloaded function
  • Constructors are available for all types to provide more flexibility and late initialization (eg. passing a ImageResource around and only creating the image with the special UIImage constructor when you need it)
  • Information about resources is now accessible, a few examples:
    • R.image.settingsIcon.name returns the name of the image
    • R.nib.myCell.identifier returns the reuse identifier string of the cell
    • R.storyboard.main.name returns the name of the storyboard

1.0.0 beta 8

12 Jan 21:44
Compare
Choose a tag to compare
1.0.0 beta 8 Pre-release
Pre-release
  • Fix issue when generating R.segue.* code

1.0.0 beta 7

12 Jan 19:10
Compare
Choose a tag to compare
1.0.0 beta 7 Pre-release
Pre-release
  • Inline code- and online documentation updates
  • nil as default parameter for optionsOrNil when initing a nib file
  • Update typed segue handling this is now done with R.segue.firstViewController.toSecondViewController(segue)
  • Create protocols for all resource types to create more consistency

1.0.0 beta 6

09 Jan 20:07
Compare
Choose a tag to compare
1.0.0 beta 6 Pre-release
Pre-release
  • Fixes an issue with R.storyboard.* values

1.0.0 beta 5

09 Jan 17:34
Compare
Choose a tag to compare
1.0.0 beta 5 Pre-release
Pre-release
  • Storyboards are not static structs anymore
  • Support for font with uppercase file extensions (thanks @pbernery)
  • Cleanup and stabilization of the API for version 1.0

1.0.0 beta 4

22 Dec 21:58
Compare
Choose a tag to compare
1.0.0 beta 4 Pre-release
Pre-release

Beta 4 changes:

  • New validate() methods based on protocols
  • Fixed issues with empty reuseIdentifiers in UICollectionViewCells
  • Fixed import statements in R.generated.swift file, also respects generics now
  • Under the hood cleanup; Nib functions moved to libs

1.0.0 beta 3

16 Dec 21:37
Compare
Choose a tag to compare
1.0.0 beta 3 Pre-release
Pre-release

Beta 3 changes:

  • Warn about segues with custom class not of type custom (crashes on iOS 8)
  • Nice new robust system to import the correct modules
  • Storyboard controller instances are now made with instantiate() instead of .instance to make it clear we always create a new fresh controller (there are some more places this is done)
  • Some documentation updates

1.0.0 beta 2

13 Dec 17:45
Compare
Choose a tag to compare
1.0.0 beta 2 Pre-release
Pre-release

Beta 2 fixes:

  • No more duplicate strings files reported
  • Deduplicate reuseIdentifiers, exact clones are now allowed just like segues
  • Support voor customModuleProvider in storyboard/nibs

1.0.0 beta 1

08 Dec 15:59
Compare
Choose a tag to compare
1.0.0 beta 1 Pre-release
Pre-release

First 1.0.0 beta release:

  • Use the new R.swift.Library for better extension support
  • The 1.0 versions drop support for iOS 7

@tomlokhorst is already working on a SegueManager extension for R.swift.