WKWebView in Interface Builder

前端 未结 12 866
南旧
南旧 2020-11-30 01:51

It seems that the IB object templates in XCode 6 beta are still creating old-style objects (UIWebView for iOS and WebView for OSX). Hopefully Apple will update them for the

12条回答
  •  长情又很酷
    2020-11-30 02:49

    You are correct - it doesn't seem to work. If you look in the headers, you'll see:

    - (instancetype)initWithCoder:(NSCoder *)coder NS_UNAVAILABLE;
    

    which implies that you can't instantiate one from a nib.

    You'll have to do it by hand in viewDidLoad or loadView.

提交回复
热议问题