UIView(SINUIViewFullscreenAdditions)
@interface UIView (SINUIViewFullscreenAdditions)
SINUIViewFullscreenAdditions are helper methods (implemented as Objective-C category methods) to make views go to full screen mode (and back to it’s previous state)
-
Declaration
Objective-C
- (BOOL)sin_isFullscreen;
Swift
func sin_isFullscreen() -> Bool
Return Value
YES if view is in full screen mode or is about to be (in animation transition).
-
Make view go into full screen mode.
The view will be moved out of it’s current place in the view hierarchy and will be added as a subview directly in the main UIWindow.
Declaration
Objective-C
- (void)sin_enableFullscreen:(BOOL)animated;
Swift
func sin_enableFullscreen(_ animated: Bool)
-
Make view go back to it’s original state before full screen mode was enabled.
The view will be moved back to it’s original superview, and it’s original frame will be restored.
Declaration
Objective-C
- (void)sin_disableFullscreen:(BOOL)animated;
Swift
func sin_disableFullscreen(_ animated: Bool)