-
Update the README with up-to-date Swift versions and Installation Instructions.
@kuyazee @AliSoftware #95 -
Set
APPLICATION_EXTENSION_API_ONLYbuild setting on built frameworks.
@AliSoftware #98 @nahung89 #88 -
Update tools used by the project (Xcode, CocoaPods, CI, Carthage).
Also SPM builds are now tested by CI.
@AliSoftware #97 -
Update SPM
Package.swiftto mention supported platforms.
@MortyMerr #89 @pahnev #93 @mackoj #85
- Support for Swift 5.0
@florentmorin #80
- Fix for only allowing the use of app extension API.
@igorkulman #73
- Only allowing the use of app extension API so using the library in an app extension does not produce a warning.
@igorkulman #70
-
Update project to support Swift 4.
@AYastrebov #54 -
Fix typo in StoryboardBased examples.
@danshevluk #42 -
Updated README instructions to Swift 3.
@neilkimmett #41
- Added a tvOS target in the Example project.
- Carthage should now see the tvOS framework
- The method
static func loadFromNib(owner:)ofNibOwnerLoadablehas been replaced by instance methodfunc loadNibContent().
This is more consistent as we need an instance (owner) anyway, and also avoids possible crashes when used withUIViewsubclasses not implementing non-required initializersinit()/init(frame:). (Methodstatic func loadFromNib()ofNibLoadableis still unchanged).
@Skoti #40 - The
storyboardproperty ofStoryboardBasedandStoryboardSceneBasedprotocols has been renamed tosceneStoryboardto avoid conflicts.
@jakubgert #33
-
Fixing documentation typos for
CollectionHeaderViewandMyXIBIndexSquaceCell.
@Skoti -
Fixing TableView Controller scene in Example project, to display cells above
UITabBar.
@Skoti
- Fix
instantiate()implementation onStoryboardSceneBasedViewControllers.
@jakubgert #38 - Removed strict
NibReusableprotocol conforming inregisterfunctions.
You can now make aReusable-only cell with aNibLoadablesubclass.
@nekrich #37
- Converted library and Demo project to Swift 3.
⚠️ The following methods have new signatures:dequeueReusableCell(indexPath:)is nowdequeueReusableCell(for:)dequeueReusableCell(indexPath:cellType:)is nowdequeueReusableCell(for:cellType:)registerReusableCell(_:)is nowregister(cellType:)registerReusableHeaderFooterView(_:)is nowregister(headerFooterViewType:)registerReusableSupplementaryView(_:viewType:)is nowregister(supplementaryViewType:ofKind:)dequeueReusableSupplementaryView(_:indexPath:viewType:)is nowdequeueReusableSupplementaryView(ofKind:for:viewType:)
@phatblat #30
@ceyhuno #31
- Adapted source files and demo project for Swift 2.3
@antondomashnev #16
- Added the possibility for
NibOwnerLoadableconfirming custom views to pass an existing instance asowner(used as the File's Owner) in case one already exists. This is especially useful to implementinit(coder:)to load the content of the XIB as subviews ofselfafter initialization. SeeMyCustomWidget.swiftfor an example.
@AliSoftware
- Added
StoryboardBasedandStoryboardSceneBasedprotocols for storyboard basedUIViewControllereasy instantiation.
@AliSoftware
- Added
NibOwnerLoadableprotocol forUIViewset as XIB's File's Owner.
@PoissonBallon #16
While the NibLoadable protocol is adapted to views loaded from XIB but that are set as the root view of the XIB,
this new NibOwnerLoadable protocol is adapted to view loaded from XIB too, but that are set as the XIB's File's Owner.
- Fixed issue with
register…methods registering the superclassTinstead of the dynamic classcellType/viewType.
@narirou #13
This parameter is only needed if you can't write … as MyCell (to let Swift infer the cell type from the return type),
which might be the case for example when your cell class is stored in a variable:
let cellType: Any.Type = self.cellTypeForIndexPath(indexPath)
// Can't do this in this case (because cellType is a variable):
let cell = tableView.dequeueReusableCell(indexPath: indexPath) as cellType ❌ // compiler error
// But now we can use that alternate way for such cases:
let cell = tableView.dequeueReusableCell(indexPath: indexPath, cellType: cellType)But if you know the type at compile time, you can omit the cellType parameter and still do this, letting the return type infer it for you:
let cell = tableView.dequeueReusableCell(indexPath: indexPath) as MyCell-
Made every method
finalto allow more optimizations.
@AliSoftware -
Banned the use of
as!in the source code in favour ofguard let x = y else { fatalError(…) }. This avoids force-casts (which are considered bad practice) and generate a more explicit fatal error in case the developer forgot something (typically forgot to set the reuseIdentifier in IB).
@AliSoftware #6 -
Fixed bundle location of nibs. By default,
nib: UINibofNibLoadableprotocol will now use the nib located in the bundle of the conforming class.
@chrisamanse #10 -
Fixed issue with subclasses of types conforming to
Reusable— due to the Swift bug SR-617.
@chrisamanse #2
- Added support for direct instantiation of arbitrary
UIViewfrom a nib.
@jakubvano #5
There is now a dedicated NibLoadable protocol which can be used on any arbitrary UIView (even non-"reusable" views) to load it from a XIB (via the loadFromNib() function injected via the protocol extension).
_The NibReusable protocol still exists for reusable cells but is now declared just as a combination of both the Reusable and NibLoadable protocols.
- Fixed missing
publicvisibility for the protocols and extensions - Improved README documentation
- Added documentation
- Fixed generic constraints on the API working with
UICollectionView'sSupplementaryView - Updated Example project to add an UICollectionView with cells from XIB & Code + Header views
- Split protocol in two:
ReusableandNibReusable - Now contains a Demo project
Initial version. Only one Reusable protocol
No demo project, but has a podspec and a Package.swift