@@ -84,7 +84,7 @@ class SuperFetchedResultsControllerDelegate : NSObject, NSFetchedResultsControll
84
84
85
85
// !MARK : Reusable View Updates (UICollectionView / UITableView)
86
86
87
- func controllerWillChangeContent( controller: NSFetchedResultsController ! )
87
+ func controllerWillChangeContent( controller: NSFetchedResultsController )
88
88
{
89
89
if ( receiverType ( ) == ReusableViewType . TableView) {
90
90
tableView!. beginUpdates ( )
@@ -93,7 +93,7 @@ class SuperFetchedResultsControllerDelegate : NSObject, NSFetchedResultsControll
93
93
}
94
94
}
95
95
96
- func controller( controller: NSFetchedResultsController ! , didChangeSection sectionInfo: NSFetchedResultsSectionInfo ! , atIndex sectionIndex: Int , forChangeType type: NSFetchedResultsChangeType )
96
+ func controller( controller: NSFetchedResultsController , didChangeSection sectionInfo: NSFetchedResultsSectionInfo , atIndex sectionIndex: Int , forChangeType type: NSFetchedResultsChangeType )
97
97
{
98
98
if ( receiverType ( ) == . TableView) {
99
99
if type == NSFetchedResultsChangeType . Insert {
@@ -117,22 +117,23 @@ class SuperFetchedResultsControllerDelegate : NSObject, NSFetchedResultsControll
117
117
}
118
118
}
119
119
120
- func controller( controller: NSFetchedResultsController ! , didChangeObject anObject: AnyObject ! , atIndexPath indexPath: NSIndexPath ! , forChangeType type: NSFetchedResultsChangeType , newIndexPath: NSIndexPath ! )
120
+ func controller( controller: NSFetchedResultsController , didChangeObject anObject: AnyObject , atIndexPath indexPath: NSIndexPath ? , forChangeType type: NSFetchedResultsChangeType , newIndexPath: NSIndexPath ? )
121
121
{
122
122
if ( receiverType ( ) == ReusableViewType . TableView) {
123
123
switch type {
124
124
case NSFetchedResultsChangeType . Insert:
125
- tableView!. insertRowsAtIndexPaths ( [ newIndexPath] , withRowAnimation: UITableViewRowAnimation . Fade)
125
+ tableView!. insertRowsAtIndexPaths ( [ newIndexPath! ] , withRowAnimation: UITableViewRowAnimation . Fade)
126
126
case NSFetchedResultsChangeType . Delete:
127
- tableView!. deleteRowsAtIndexPaths ( [ indexPath] , withRowAnimation: UITableViewRowAnimation . Fade)
127
+ tableView!. deleteRowsAtIndexPaths ( [ indexPath! ] , withRowAnimation: UITableViewRowAnimation . Fade)
128
128
case NSFetchedResultsChangeType . Update:
129
- tableView!. reloadRowsAtIndexPaths ( [ indexPath] , withRowAnimation: UITableViewRowAnimation . Fade)
129
+ tableView!. reloadRowsAtIndexPaths ( [ indexPath! ] , withRowAnimation: UITableViewRowAnimation . Fade)
130
130
case NSFetchedResultsChangeType . Move:
131
- tableView!. deleteRowsAtIndexPaths ( [ indexPath] , withRowAnimation: UITableViewRowAnimation . Fade)
132
- tableView!. insertRowsAtIndexPaths ( [ newIndexPath] , withRowAnimation: UITableViewRowAnimation . Fade)
131
+ tableView!. deleteRowsAtIndexPaths ( [ indexPath! ] , withRowAnimation: UITableViewRowAnimation . Fade)
132
+ tableView!. insertRowsAtIndexPaths ( [ newIndexPath! ] , withRowAnimation: UITableViewRowAnimation . Fade)
133
133
default :
134
134
println ( " Unexpected NSFetchedResultsChangeType received for didChangeObject. \( type) " )
135
135
}
136
+
136
137
} else if ( receiverType ( ) == ReusableViewType . CollectionView) {
137
138
var changeDictionary : Dictionary < NSFetchedResultsChangeType , AnyObject > = Dictionary ( )
138
139
@@ -148,7 +149,7 @@ class SuperFetchedResultsControllerDelegate : NSObject, NSFetchedResultsControll
148
149
break ;
149
150
case NSFetchedResultsChangeType . Move:
150
151
// !TODO : we may need to migrate this to a homogenous Array as I expect this to throw a runtime exception.
151
- changeDictionary [ type] = [ indexPath, newIndexPath]
152
+ changeDictionary [ type] = [ indexPath! , newIndexPath! ]
152
153
break ;
153
154
default :
154
155
println ( " Unexpected NSFetchedResultsChangeType received for didChangeObject. \( type) " )
@@ -157,7 +158,7 @@ class SuperFetchedResultsControllerDelegate : NSObject, NSFetchedResultsControll
157
158
}
158
159
}
159
160
160
- func controllerDidChangeContent( controller: NSFetchedResultsController ! )
161
+ func controllerDidChangeContent( controller: NSFetchedResultsController )
161
162
{
162
163
if ( receiverType ( ) == ReusableViewType . TableView) {
163
164
tableView!. endUpdates ( )
0 commit comments