Explorar o código

Fix bug introduced in 4.2.0, unable to edit members

Oopsie
Tanner Bennett %!s(int64=5) %!d(string=hai) anos
pai
achega
3f82631a95

+ 1 - 1
Classes/ObjectExplorers/Sections/Shortcuts/FLEXShortcut.h

@@ -32,7 +32,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @optional
 /// Called when the (i) button is pressed if the accessory type includes it
-- (UIViewController *)editorWith:(id)object;
+- (UIViewController *)editorWith:(id)object forSection:(FLEXTableViewSection *)section;
 
 @end
 

+ 2 - 2
Classes/ObjectExplorers/Sections/Shortcuts/FLEXShortcutsSection.m

@@ -201,10 +201,10 @@
 
 - (void (^)(__kindof UIViewController *))didPressInfoButtonAction:(NSInteger)row {
     id<FLEXShortcut> shortcut = self.shortcuts[row];
-    if ([shortcut respondsToSelector:@selector(editorWith:)]) {
+    if ([shortcut respondsToSelector:@selector(editorWith:forSection:)]) {
         id object = self.object;
         return ^(UIViewController *host) {
-            UIViewController *editor = [shortcut editorWith:object];
+            UIViewController *editor = [shortcut editorWith:object forSection:self];
             [host.navigationController pushViewController:editor animated:YES];
         };
     }