Эх сурвалжийг харах

coding

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 жил өмнө
parent
commit
a476fb5ef3

+ 10 - 1
iOSClient/Settings/NCManageE2EE.swift

@@ -23,9 +23,18 @@
 
 import SwiftUI
 
+@objc
+class NCManageE2EEInterface: NSObject {
+    @objc func makeShipDetailsUI() -> UIViewController {
+        var details = NCManageE2EE()
+        return UIHostingController(rootView: details)
+    }
+}
+
 struct NCManageE2EE: View {
     var body: some View {
-        Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
+        Text("Hello, world!")
+            .navigationTitle("Cifratura End-To-End")
     }
 }
 

+ 10 - 2
iOSClient/Settings/NCSettings.m

@@ -117,8 +117,8 @@
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
         [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:[[UIImage imageNamed:@"lock"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
-        row.action.viewControllerClass = [NCManageEndToEndEncryption class];
-
+        row.action.formSelector = @selector(manageE2EE:);
+        //row.action.viewControllerClass = [NCManageEndToEndEncryption class];
         [section addFormRow:row];
     }
 
@@ -296,6 +296,14 @@
 
 #pragma mark -
 
+- (void)manageE2EE:(XLFormRowDescriptor *)sender
+{
+    [self deselectFormRow:sender];
+
+    UIViewController *vc = [[NCManageE2EEInterface alloc] makeShipDetailsUI];
+    [self.navigationController pushViewController:vc animated:YES];
+}
+
 - (void)privacy:(XLFormRowDescriptor *)sender
 {
     [self deselectFormRow:sender];