UITabViewController 생성시 오류 문의

1 답변 글타래를 보이고 있습니다
  • 글쓴이
    • 낙현 김
      참가자
      • 글작성 : 6
      • 답글작성 : 2

      let vc = u.instantiateViewController(withIdentifier: “TabViewController”) as! TabViewController

      IntrolViewController에서 TabViewController 생성 하는데 오류가 발생 하는데요

      변수 초기화 에러가 난다고 하는데 제가 사용 하는 방법이 잘 못 되었나요?

       

      파이어베이스 크래시 에러

      Crashed: com.apple.main-thread
      0 *** 0x1a1044 closure #1 in variable initialization expression of TabViewController.floatingView + 4306800708 (TabViewController.swift:4306800708)
      1 *** 0x1a95e8 specialized TabViewController.init(coder:) + 25 (TabViewController.swift:25)
      2 *** 0x1a7424 @objc TabViewController.init(coder:) + 4306826276 (<compiler-generated>:4306826276)
      3 UIKitCore 0x419b6c -[UIClassSwapper initWithCoder:] + 2120
      4 UIFoundation 0x62fb0 UINibDecoderDecodeObjectForValue + 700
      5 UIFoundation 0x38f0 -[UINibDecoder decodeObjectForKey:] + 312
      6 UIKitCore 0x59998c -[UIRuntimeConnection initWithCoder:] + 132
      7 UIFoundation 0x62fb0 UINibDecoderDecodeObjectForValue + 700
      8 UIFoundation 0x631dc UINibDecoderDecodeObjectForValue + 1256
      9 UIFoundation 0x38f0 -[UINibDecoder decodeObjectForKey:] + 312
      10 UIKitCore 0x59c264 -[NSCoder(UIIBDependencyInjectionInternal) _decodeObjectsWithSourceSegueTemplate:creator:sender:forKey:] + 492
      11 UIKitCore 0x53aed0 -[UINib instantiateWithOwner:options:] + 1068
      12 UIKitCore 0xb7e7c -[UIStoryboard reallyInstantiateViewControllerWithIdentifier:creator:storyboardSegueTemplate:sender:] + 284
      13 *** 0x20e7b4 closure #1 in IntroViewController.netWorkConnect() + 503 (IntroViewController.swift:503)
      14 *** 0x3c80f8 partial apply for specialized closure #2 in closure #2 in closure #3 in closure #1 in DownloadRequest.response(queue:responseSerializer:completionHandler:) + 4309057784
      15 *** 0x42dd8 thunk for @escaping @callee_guaranteed () -> () + 4305366488 (<compiler-generated>:4305366488)
      16 libdispatch.dylib 0x1c04 _dispatch_call_block_and_release + 32
      17 libdispatch.dylib 0x3950 _dispatch_client_callout + 20
      18 libdispatch.dylib 0x11d30 _dispatch_main_queue_callback_4CF + 940
      19 CoreFoundation 0x51ce4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE
      + 16
      20 CoreFoundation 0xbebc __CFRunLoopRun + 2540
      21 CoreFoundation 0x1f3c8 CFRunLoopRunSpecific + 600
      22 GraphicsServices 0x138c GSEventRunModal + 164
      23 UIKitCore 0x51b060 -[UIApplication _run] + 1100
      24 UIKitCore 0x298b8c UIApplicationMain + 2124
      25 libswiftUIKit.dylib 0x31184 UIApplicationMain(_:_:_:_:) + 104
      26 *** 0x2b081c main + 4307912732 (AppDelegate.swift:4307912732)
      27 ??? 0x101621a24 (누락)

      스크린샷 2021-10-26 오후 7.09.15

       

    • 야곰
      키 마스터
      • 글작성 : 37
      • 답글작성 : 580

      저 코드조각만으로는 전혀 모르겠는데요.

      콜스택 보면 인터페이스 파일 로드해서 처리하는 과정에서 문제가 있어보입니다.
      혹은 네트워킹쪽 스레드 문제 같기도 하고요.
      이 내용만으로는 파악이 어렵네요.

      • 낙현 김
        참가자
        • 글작성 : 6
        • 답글작성 : 2

         

        야곰님 답변 감사합니다.

         

        FloatingView 내부 코드가 아래와 같은데 생성자를 선언안해줘서 그런 문제가 될수 있나요?

         

        저는 오류가 안나는데 답답하네요^^

         

        스크린샷 2021-10-27 오후 3.47.57

         

        • 야곰
          키 마스터
          • 글작성 : 37
          • 답글작성 : 580

          아, 사용자쪽에서 안된다고 리포트가 들어온거예요?

          IntroViewController.netWorkConnect 쪽도 의심이 드는데요.
          뭔가 네트워크 통신과 로직코드의 타이밍 문제 같기도 하고요…

1 답변 글타래를 보이고 있습니다
  • 답변은 로그인 후 가능합니다.

logo landscape small

사업자번호 : 743-81-02195
통신판매업 신고번호 : 제 2022-충북청주-1278 호
고객센터 : 카카오톡채널 @yagom