2016-12-20 64 views
1

我試圖創建與web視圖故事板嵌入到它 然後在視圖控制器控制器類,裏面viewDidLoad方法如何嵌入的WebView內InputView對於IOS自定義鍵盤的應用程序擴展

[self.myWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://www.google.com"]]]; 

日誌:


CustomKeyboard[1865:37706] [Common] BKSAccelerometer unable to create notifyd token for device orientation

CustomKeyboard[1865:37779] [default] error registring notify port: (1000000)

CustomKeyboard[1865:37706] [] __nwlog_err_simulate_crash_libsystem libsystem simulate crash failed "libsystem_network.dylib: networkd_settings_setup_notify_watch :: notify_register_dispatch(com.apple.system.networkd.settings) [status 1000000] failed"

CustomKeyboard[1865:37706] [] networkd_settings_setup_notify_watch notify_register_dispatch(com.apple.system.networkd.settings) [status 1000000] failed, dumping backtrace:
[arm64] libnetcore-856.1.8
0 libsystem_network.dylib 0x0000000188db5534 __nw_create_backtrace_string + 116
1 libsystem_network.dylib 0x0000000188dd17e4 + 332
2 libsystem_network.dylib 0x0000000188dd15b0 + 68
3 libsystem_network.dylib 0x0000000188da91a8 nwlog_is_debug_logging_enabled + 32
4 libsystem_network.dylib 0x0000000188dc8fac + 256
5 libsystem_network.dylib 0x0000000188dc917c + 24
6 libdispatch.dylib 0x0000000188c051c0 + 16
7 libdispatch.dylib 0x0000000188c12860 + 84
8 libsystem_network.dylib 0x0000000188dc7088 + 160
9 libsystem_network.dylib 0x0000000188dc6b1c + 136
10 libsy

CustomKeyboard[1865:37706] [] __nwlog_err_simulate_crash_libsystem libsystem simulate crash failed "libsystem_network.dylib: networkd_settings_init :: notify_register_check(nw_notification_name_settings) status 1000000 token -1 failed"

CustomKeyboard[1865:37706] [] networkd_settings_init notify_register_check(nw_notification_name_settings) status 1000000 token -1 failed, dumping backtrace:
[arm64] libnetcore-856.1.8
0 libsystem_network.dylib 0x0000000188db5534 __nw_create_backtrace_string + 116
1 libsystem_network.dylib 0x0000000188dd1620 + 180
2 libsystem_network.dylib 0x0000000188da91a8 nwlog_is_debug_logging_enabled + 32
3 libsystem_network.dylib 0x0000000188dc8fac + 256
4 libsystem_network.dylib 0x0000000188dc917c + 24
5 libdispatch.dylib 0x0000000188c051c0 + 16
6 libdispatch.dylib 0x0000000188c12860 + 84
7 libsystem_network.dylib 0x0000000188dc7088 + 160
8 libsystem_network.dylib 0x0000000188dc6b1c + 136
9 libsystem_network.dylib 0x0000000188dc68c4 nw_path_create_evaluator_for_endpoint + 972


CustomKeyboard[1865:37912] dnssd_clientstub ConnectToServer: connect()-> No of tries: 1

CustomKeyboard[1865:37912] dnssd_clientstub ConnectToServer: connect()-> No of tries: 2

CustomKeyboard[1865:37912] dnssd_clientstub ConnectToServer: connect()-> No of tries: 3

CustomKeyboard[1865:37912] dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:5 Err:-1 Errno:1 Operation not permitted

CustomKeyboard[1865:37912] [] nw_resolver_create_dns_service_on_queue DNSServiceCreateConnection failed: ServiceNotRunning(-65563)

CustomKeyboard[1865:37945] [] __nw_connection_get_connected_socket_block_invoke 2 Connection has no connected handler

CustomKeyboard[1865:37929] PAC stream failed with

CustomKeyboard[1865:37929] [] nw_proxy_resolver_create_parsed_array PAC evaluation error: kCFErrorDomainCFNetwork: -72000

CustomKeyboard[1865:37929] dnssd_clientstub ConnectToServer: connect()-> No of tries: 1

CustomKeyboard[1865:37929] dnssd_clientstub ConnectToServer: connect()-> No of tries: 2

CustomKeyboard[1865:37929] dnssd_clientstub ConnectToServer: connect()-> No of tries: 3

CustomKeyboard[1865:37929] dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:5 Err:-1 Errno:1 Operation not permitted

CustomKeyboard[1865:37929] [] nw_resolver_create_dns_service_on_queue DNSServiceCreateConnection failed: ServiceNotRunning(-65563)

+0

我有一個類似的問題,試圖嵌入一個聯繫人視圖控制器到自定義鍵盤。您的模擬器/測試設備是什麼iOS版本? –

+0

我在ios 10上測試它 –

+0

您是否找到解決方案? –

回答

1

將代碼放在viewDidAppear方法而不是viewDidLoad中方法

 
- (void)viewDidAppear:(BOOL)animated { 

    CGRect screenRect = [[UIScreen mainScreen] bounds]; 
    CGFloat screenWidth = screenRect.size.width; 
    //CGFloat screenHeight = screenRect.size.height; 

    UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, screenWidth, 800)]; 
    NSString *urlString = @"http://mum00blf.in.oracle.com:7777/index/public/login.html"; 
    NSURL *url = [NSURL URLWithString:urlString]; 
    NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url]; 
    [webView loadRequest:urlRequest]; 


    /*dispatch_async(dispatch_get_main_queue(), ^(void){ 
      [self.view addSubview:webView]; 
    });*/ 

    [self.view addSubview:webView]; 

}
相關問題