Skip to content

Commit

Permalink
upgrade mac macOS source update to latest betas
Browse files Browse the repository at this point in the history
  • Loading branch information
icanzilb committed Sep 26, 2017
1 parent b8ffd2d commit 5dc996f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
11 changes: 11 additions & 0 deletions Example/Podfile
Expand Up @@ -15,3 +15,14 @@ abstract_target 'Demo' do
platform :osx, '10.12'
end
end

# for the transitional period to swift4
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
next unless target.name.include?("RxRealmData")

config.build_settings['SWIFT_VERSION'] = '4.0'
end
end
end
4 changes: 2 additions & 2 deletions Pod/Classes/Reactive+RxRealmDataSources.swift
Expand Up @@ -19,7 +19,7 @@ import UIKit
extension Reactive where Base: UITableView {

public func realmChanges<E>(_ dataSource: RxTableViewRealmDataSource<E>)
-> RealmBindObserver<E, AnyRealmCollection<E>, RxTableViewRealmDataSource<E>> where E: Object {
-> RealmBindObserver<E, AnyRealmCollection<E>, RxTableViewRealmDataSource<E>> {

return RealmBindObserver(dataSource: dataSource) {ds, results, changes in
if ds.tableView == nil {
Expand Down Expand Up @@ -48,7 +48,7 @@ extension Reactive where Base: UITableView {
extension Reactive where Base: UICollectionView {

public func realmChanges<E>(_ dataSource: RxCollectionViewRealmDataSource<E>)
-> RealmBindObserver<E, AnyRealmCollection<E>, RxCollectionViewRealmDataSource<E>> where E: Object {
-> RealmBindObserver<E, AnyRealmCollection<E>, RxCollectionViewRealmDataSource<E>> {

return RealmBindObserver(dataSource: dataSource) {ds, results, changes in
if ds.collectionView == nil {
Expand Down
2 changes: 1 addition & 1 deletion Pod/Classes/RxCollectionViewRealmDataSource.swift
Expand Up @@ -132,7 +132,7 @@ import Cocoa
public init<ItemType>(itemIdentifier: String, itemType: ItemType.Type, itemConfig: @escaping CollectionItemConfig<E, ItemType>) where ItemType: NSCollectionViewItem {
self.itemIdentifier = itemIdentifier
self.itemFactory = { ds, cv, ip, model in
let item = cv.makeItem(withIdentifier: itemIdentifier, for: ip) as! ItemType
let item = cv.makeItem(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: itemIdentifier), for: ip) as! ItemType
itemConfig(item, ip, model)
return item
}
Expand Down
2 changes: 1 addition & 1 deletion Pod/Classes/RxTableViewRealmDataSource.swift
Expand Up @@ -152,7 +152,7 @@ import RxRealm
public init<CellType>(cellIdentifier: String, cellType: CellType.Type, cellConfig: @escaping TableCellConfig<E, CellType>) where CellType: NSTableCellView {
self.cellIdentifier = cellIdentifier
self.cellFactory = { ds, tv, row, model in
let cell = tv.make(withIdentifier: cellIdentifier, owner: tv) as! CellType
let cell = tv.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: cellIdentifier), owner: tv) as! CellType
cellConfig(cell, row, model)
return cell
}
Expand Down

0 comments on commit 5dc996f

Please sign in to comment.