unused function warning on static function in header file

static function in header file is imported in every souce file that imports that header file.

And those source files all owns the copy of the static function.

The warning arouses because not every source files that import the header file uses the static function.

You’d better add “inline”

Inline

Summary: Suggests the body of a function should be moved into the callers.

ViewController

presentViewController:animated:completion:

Presents a view controller modally.

pushViewController:animated:

Pushes a view controller onto the receiver’s stack and updates the display.

rootViewController

The root view controller for the window.

The root view controller provides the content view of the window. Assigning a view controller to this property (either programmatically or using Interface Builder) installs the view controller’s view as the content view of the window. The new content view is configured to track the window size, changing as the window size changes. If the window has an existing view hierarchy, the old views are removed before the new ones are installed.

The default value of this property is nil.

makeKeyAndVisible()

Shows the window and makes it the key window.

This is a convenience method to show the current window and position it in front of all other windows at the same level or lower. If you only want to show the window, change its hiddenproperty to NO.

 

A window is considered the key window when it is currently receiving keyboard and non touch-related events. Whereas touch events are delivered to the window in which the touch occurred, events that don’t have an associated coordinate value are delivered to the key window.

hidden

A Boolean value that determines whether the view is hidden.

Setting the value of this property to YES hides the receiver and setting it to NO shows the receiver. The default value is NO.

A hidden view disappears from its window and does not receive input events. It remains in its superview’s list of subviews, however, and participates in autoresizing as usual. Hiding a view with subviews has the effect of hiding those subviews and any view descendants they might have. This effect is implicit and does not alter the hidden state of the receiver’s descendants.

Hiding the view that is the window’s current first responder causes the view’s next valid key view to become the new first responder.

The value of this property reflects the state of the receiver only and does not account for the state of the receiver’s ancestors in the view hierarchy. Thus this property can be NO but the receiver may still be hidden if an ancestor is hidden.

https://developer.apple.com/library/content/documentation/WindowsViews/Conceptual/WindowAndScreenGuide/WindowScreenRolesinApp/WindowScreenRolesinApp.html

 

 

popToViewController:animated:

Pops view controllers until the specified view controller is at the top of the navigation stack.

webview의 바다

webView(_:didFailLoadWithError:)

Sent if a web view failed to load a frame.

error가 있으면 alert

 

setNeedsLayout(_:)

Required.

Sets whether or not the receiver should change its layout.

Sets whether the receiver needs to update its layout in the next call to its drawRect: method.

protocol: 클래스 사이에서 공유되는 메서드 목록-> 구현 부분이 없다

특정 이름과 관련된 메서드 모음을 정의required인 것도 있고 아닌 메서드도 있다

http://developtip.tistory.com/52

 

The UIWebViewDelegate protocol defines methods that a delegate of a UIWebView object can optionally implement to intervene when web content is loaded.

Before releasing an instance of UIWebView for which you have set a delegate, you must first set the UIWebView delegate property to nil before disposing of the UIWebView instance. This can be done, for example, in the dealloc method where you dispose of the UIWebView.