Mac Developer Library

Developer

WebKit Framework Reference WebFrameView Class Reference

Options
Deployment Target:

On This Page
Language:

WebFrameView

Inheritance


Import Statement


Swift

import WebKit

Objective-C

@import WebKit;

Availability


Available in OS X v10.2 with Safari 1.0 and later.
Available in OS X v10.2.7 and later.

WebFrameView objects and their subviews display the web content contained in a frame. You never create instances of WebFrameView directly—WebView objects create and manage a hierarchy of WebFrameView objects, one for each frame. WebFrameView objects use a scroll view whose document view conforms to the WebDocumentView protocol.

  • Returns the web frame.

    Declaration

    Swift

    var webFrame: WebFrame! { get }

    Objective-C

    @property(nonatomic, readonly, strong) WebFrame *webFrame

    Return Value

    The web frame.

    Import Statement

    Objective-C

    @import WebKit;

    Swift

    import WebKit

    Availability

    Available in OS X v10.2 with Safari 1.0 and later.

    Available in OS X v10.2.7 and later.

  • Returns the subview that displays the web content.

    Declaration

    Swift

    var documentView: NSView! { get }

    Objective-C

    @property(nonatomic, readonly, strong) NSView<WebDocumentView> *documentView

    Return Value

    The subview that displays the web content.

    Discussion

    Use setAllowsScrolling: to enable scrolling of this view.

    Import Statement

    Objective-C

    @import WebKit;

    Swift

    import WebKit

    Availability

    Available in OS X v10.2 with Safari 1.0 and later.

    Available in OS X v10.2.7 and later.

  • Sets whether the frame view should allow users to scroll.

    Declaration

    Swift

    var allowsScrolling: Bool

    Objective-C

    @property(nonatomic) BOOL allowsScrolling

    Parameters

    flag

    If YEStrue, scrolling is allowed; if NOfalse, it is not. If the frame contains a scrolling element, then that value is used as the default; otherwise, the default is YEStrue.

    Import Statement

    Objective-C

    @import WebKit;

    Swift

    import WebKit

    Availability

    Available in OS X v10.2 with Safari 1.0 and later.

    Available in OS X v10.2.7 and later.

  • Returns a Boolean value indicating whether users can scroll.

    Declaration

    Swift

    var allowsScrolling: Bool

    Objective-C

    @property(nonatomic) BOOL allowsScrolling

    Return Value

    YEStrue if the receiver allows users to scroll; otherwise, NOfalse.

    Import Statement

    Objective-C

    @import WebKit;

    Swift

    import WebKit

    Availability

    Available in OS X v10.2 with Safari 1.0 and later.

    Available in OS X v10.2.7 and later.

  • Returns a Boolean value indicating whether the receiver can print headers and footers.

    Declaration

    Swift

    var canPrintHeadersAndFooters: Bool { get }

    Objective-C

    @property(nonatomic, readonly) BOOL canPrintHeadersAndFooters

    Return Value

    YEStrue if the receiver can print headers and footers; otherwise, NOfalse.

    Import Statement

    Objective-C

    @import WebKit;

    Swift

    import WebKit

    Availability

    Available in OS X v10.4.11 and later.

  • Returns a print operation object to print this frame.

    Declaration

    Swift

    func printOperationWithPrintInfo(_ printInfo: NSPrintInfo!) -> NSPrintOperation!

    Objective-C

    - (NSPrintOperation *)printOperationWithPrintInfo:(NSPrintInfo *)printInfo

    Parameters

    printInfo

    Information about the print settings needed to print this frame. See NSPrintInfo Class Reference for more information about this object.

    Return Value

    An NSPrintOperation object set up to print this frame. See NSPrintOperation Class Reference for more information about this object.

    Import Statement

    Objective-C

    @import WebKit;

    Swift

    import WebKit

    Availability

    Available in OS X v10.4.11 and later.

  • Returns a Boolean value indicating whether the document view should handle a print operation.

    Declaration

    Swift

    var documentViewShouldHandlePrint: Bool { get }

    Objective-C

    @property(nonatomic, readonly) BOOL documentViewShouldHandlePrint

    Return Value

    YEStrue if the document view should handle the print operation; otherwise, NOfalse.

    Discussion

    If this method returns NOfalse, the application terminates its print operation and sends printDocumentView to the web frame view.

    Import Statement

    Objective-C

    @import WebKit;

    Swift

    import WebKit

    Availability

    Available in OS X v10.4.11 and later.

  • Prints the receiver.

    Declaration

    Swift

    func printDocumentView()

    Objective-C

    - (void)printDocumentView

    Discussion

    This method is invoked if the documentViewShouldHandlePrint method returns NOfalse.

    Import Statement

    Objective-C

    @import WebKit;

    Swift

    import WebKit

    Availability

    Available in OS X v10.4.11 and later.