Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSViewMBS class.

Next items

NSViewMBS.addSubview(subview as NSViewMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Adds a view to the subviews so it's displayed above its siblings.
Example
// create a button
dim n as new NSButtonMBS(100, 100, 50, 24)

n.bezelStyle = n.NSRoundedBezelStyle
n.Title = "Test"

// add directly to window's content view
window1.NSWindowMBS.contentView.addSubview n

See also:

Some examples using this method:

NSViewMBS.addSubview(subview as NSViewMBS, positioned as Integer, relativeToView as NSViewMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 12.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Inserts a view among the receiver's subviews so it's displayed immediately above or below another view.
Example
// create a button
dim n as new NSButtonMBS(100, 100, 50, 24)

n.bezelStyle = n.NSRoundedBezelStyle
n.Title = "Test"

// add directly to window's super view, below the content view
// so it is behind all RB controls
window1.NSWindowMBS.contentView.superview.addSubview n, NSWindowMBS.NSWindowBelow, window1.NSWindowMBS.contentView

subView: The view object to add to the receiver as a subview.
positioned: A constant specifying the position of the aView relative to otherView. Valid values are NSWindowAbove or NSWindowBelow.
relativeToView: The other view subView is to be positioned relative to. If relativeToView is nil (or isn't a subview of the receiver), subView is added above or below all of its new siblings.

This method also sets the receiver as the next responder of aView.

See also:

NSViewMBS.addToolTipRect(rect as NSRectMBS, tooltip as NSViewTooltipMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 18.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates a tooltip for a defined area the view and returns a tag that identifies the tooltip rectangle.

Rect: A rectangle defining the region of the view to associate the tooltip with.
tooltip: The object to provide text.

Please keep reference of tooltip object as the tooltip is removed by it's destructor.

Some examples using this method:

NSViewMBS.ancestorSharedWithView(view as NSViewMBS) as NSViewMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The closest ancestor shared by the receiver and a given view.

The closest ancestor or nil if there's no such object. Returns self if aView is identical to the receiver.

NSViewMBS.animator as NSViewMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the proxy object for this view which animates.
Example
dim v as NSViewMBS // your NSViewMBS object

v.alphaValue = 0.5 // switch alpha directly
v.animator.alphaValue = 0.5 // switch alpha animated

NSViewMBS.backgroundFilters as variant()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 18.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
An array of Core Image filters to apply to the view’s background.

This property contains an array of CIFilterMBS objects. This array represents the background filters stored in the backgroundFilters property of the view’s layer. If the view does not have a layer, setting the value of this property has no effect.
The default value of this property is an empty array.

We use variant here to reduce plugin dependencies. Please use with array of variants containing CIFilterMBS.

NSViewMBS.beginDraggingSessionWithItems(items() as Variant, e as NSEventMBS, source as NSViewMBS) as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Initiates a dragging session with a group of dragging items.

items: The dragging items (array of variant containing NSDraggingItemMBS objects). The frame property of each NSDraggingItem must be in the view's coordinate system.
event: The mouse-down event object from which to initiate the drag operation. In particular, its mouse location is used for the offset of the icon being dragged.
source: An object that serves as the controller of the dragging operation. It must conform to the NSDraggingSource informal protocol and is typically the receiver itself or its NSWindow object.

Returns the dragging session for the drag (NSDraggingSessionMBS object). Returned as Variant to reduce plugin dependencies.

A basic drag starts by calling beginDraggingSessionWithItems.

The caller can take the returned NSDraggingSession and continue to modify its properties such as slidesBackOnCancelOrFail. When the drag actually starts, the source is sent a draggingSessionWillBeginAtPoint message followed by multiple draggingSessionMovedToPoint messages as the user drags.

Once the drag is ended or cancelled, the source receives a draggingSessionEndedAtPoint:operation and the drag is complete.

Available in OS X v10.7 and later.

Some examples using this method:

NSViewMBS.compositingFilter as variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 18.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The Core Image filter used to composite the view’s contents with its background.

This property contains the compositing filter stored in the compositingFilter property of the view’s layer. If the view does not have a layer, setting the value of this property has no effect.
The default value of this property is nil, which causes content to be rendered without any special compositing effects.

We use variant here to reduce plugin dependencies. Please use with variant containing CIFilterMBS.
(Read and Write computed property)

NSViewMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates a new control with size 100/100 and position 0/0

On success the handle property is not zero.

See also:

NSViewMBS.Constructor(Handle as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an object based on the given NSView handle.
Example
dim t as new NSTextViewMBS(0, 0, 100, 100)
dim v as new NSTextViewMBS(t.handle)

MsgBox str(v.Bounds.Width)+" x "+str(v.Bounds.Height)

The handle is casted to a NSView and the plugin retains this handle.

See also:

NSViewMBS.Constructor(left as Double, top as Double, width as Double, height as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 7.8 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The constructor to create a new NSView.

On success handle is set.

For a toolbar, please get the view directly: self.NSToolbarMBS.toolbarView.

See also:

NSViewMBS.contentFilters as variant()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 18.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
An array of Core Image filters to apply to the contents of the view and its sublayers.

This property contains an array of CIFilterMBS objects. This array represents the filters stored in the filters property of the view’s layer. If the view does not have a layer, setting the value of this property has no effect.
The default value of this property is an empty array.

We use variant here to reduce plugin dependencies. Please use with array of variants containing CIFilterMBS.

NSViewMBS.convertPointFromView(point as NSPointMBS, View as NSViewMBS) as NSPointMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Converts a point from the coordinate system of a given view to that of the receiver.

point: A point specifying a location in the coordinate system of aView.
View: The view with aPoint in its coordinate system. If View is nil, this method instead converts from window base coordinates. Otherwise, both View and the receiver must belong to the same NSWindow object.

Returns the point converted to the coordinate system of the receiver.

Some examples using this method:

NSViewMBS.convertPointToView(point as NSPointMBS, View as NSViewMBS) as NSPointMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Converts a point from the receiver's coordinate system to that of a given view.

point: A point specifying a location in the coordinate system of the receiver.
View: The view into whose coordinate system point is to be converted. If View is nil, this method instead converts to window base coordinates. Otherwise, both View and the receiver must belong to the same NSWindow object.

Returns the point converted to the coordinate system of View.

NSViewMBS.convertRectFromView(rect as NSRectMBS, View as NSViewMBS) as NSRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Converts a rectangle from the coordinate system of another view to that of the receiver.

rect: The rectangle in aView's coordinate system.
view: The view with aRect in its coordinate system. If view is nil, this method instead converts from window base coordinates. Otherwise, both view and the receiver must belong to the same NSWindow object.

Returns the converted rectangle.

NSViewMBS.convertRectToView(rect as NSRectMBS, View as NSViewMBS) as NSRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Converts a rectangle from the receiver's coordinate system to that of another view.

rect: A rectangle in the receiver's coordinate system.
View: The view that is the target of the conversion operation. If View is nil, this method instead converts from window base coordinates. Otherwise, both View and the receiver must belong to the same NSWindow object.

Returns the converted rectangle.

Some examples using this method:

NSViewMBS.convertSizeFromView(Size as NSSizeMBS, View as NSViewMBS) as NSSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Converts a size from another view's coordinate system to that of the receiver.

Size: The size (width and height) in aView's coordinate system.
View: The view with Size in its coordinate system. If View is nil, this method instead converts from window base coordinates. Otherwise, both View and the receiver must belong to the same NSWindow object.

Returns the converted size, as an NSSize structure.

NSViewMBS.convertSizeToView(Size as NSSizeMBS, View as NSViewMBS) as NSSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Converts a size from the receiver's coordinate system to that of another view.

Size: The size (width and height) in the receiver's coordinate system.
View: The view that is the target of the conversion operation. If View is nil, this method instead converts from window base coordinates. Otherwise, both View and the receiver must belong to the same NSWindow object.

Returns the converted size, as an NSSize structure.

NSViewMBS.dataWithEPSInsideRect(left as Double, top as Double, width as Double, height as Double) as Memoryblock

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns EPS data that draws the region of the receiver within a specified rectangle.
Example
dim n as new NSProgressIndicatorMBS
n.sizeToFit

dim data as string = n.dataWithEPSInsideRect(0, 0, n.frameWidth, n.frameHeight)
dim f as FolderItem = SpecialFolder.Desktop.Child("test.ps")
dim b as BinaryStream = f.CreateBinaryFile("")

b.Write data
f.Launch

NSViewMBS.dataWithPDFInsideRect(left as Double, top as Double, width as Double, height as Double) as Memoryblock

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns PDF data that draws the region of the receiver within a specified rectangle.
Example
dim n as new NSProgressIndicatorMBS
n.sizeToFit

dim data as string = n.dataWithPDFInsideRect(0, 0, n.frameWidth, n.frameHeight)
dim f as FolderItem = SpecialFolder.Desktop.Child("test.pdf")
dim b as BinaryStream = f.CreateBinaryFile("")

b.Write data
f.Launch

See also:

NSViewMBS.dataWithPDFInsideRect(r as NSRectMBS) as Memoryblock

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 14.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns PDF data that draws the region of the receiver within a specified rectangle.

See also:

NSViewMBS.dragImage(image as NSImageMBS, viewLocation as NSPointMBS, offset as NSSizeMBS, NSEvent as NSEventMBS, pboard as NSPasteboardMBS, source as NSViewMBS, slideFlag as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 13.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Initiates a dragging operation from the receiver, allowing the user to drag arbitrary data with a specified icon into any application that has window or view objects that accept dragged data.

Image: The NSImage object to be dragged.
viewLocation: The location of the image's lower-left corner, in the receiver's coordinate system. It determines the placement of the dragged image under the cursor. When determining the image location you should use the mouse down coordinate, provided in theEvent, rather than the current mouse location.
offset: This parameter is ignored.
NSEvent: The left mouse-down event that triggered the dragging operation (see discussion below).
pboard: The pasteboard that holds the data to be transferred to the destination (see discussion below).
source: An object that serves as the controller of the dragging operation. It must conform to the NSDraggingSource protocol and is typically the receiver itself or its NSWindow object.
slideBack: A Boolean that determines whether the drag image should slide back if it's rejected. The image slides back to imageLoc if slideBack is true and the image isn't accepted by the dragging destination. If false the image doesn't slide back.

This method must be invoked only within an implementation of the mouseDown or mouseDragged methods.
Before invoking this method, you must place the data to be transferred on pboard. To do this, get the drag pasteboard object (NSDragPboard), declare the types of the data, and then put the data on the pasteboard.

NSViewMBS.drawFocusRingMask

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Draws the focus ring mask for the view.

This method provides the shape of the focus ring mask by drawing the focus ring mask. An implementation of this method should draw in the view's interior (bounds) coordinate space, that the focus ring style has been set (it will be set it to NSFocusRingOnly to capture the focus ring itself), and that the fill and stroke colors have been set to an arbitrary fully opaque color.

Subclasses that find the default behavior insufficient should only draw the focus ring shape.

The NSView implementation of this method simply fills self.bounds.
Available in Mac OS X v10.7 and later.

NSViewMBS.enclosingMenuItem as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the menu item containing the receiver or any of its superviews in the view hierarchy.

Returns the menu item containing the receiver or any of its superviews in the view hierarchy, or nil if the receiver's view hierarchy is not in a menu item

Available in Mac OS X v10.5 and later.

Declared as a variant to reduce plugin dependencies.
Please assign to a NSScrollViewMBS variable.

NSViewMBS.enclosingScrollView as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the nearest ancestor NSScrollView object containing the receiver (not including the receiver itself); otherwise returns nil.

Declared as a variant to reduce plugin dependencies.
Please assign to a NSScrollViewMBS variable.

NSViewMBS.focusRingMaskBounds as NSRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the focus ring mask bounds.

Returns a rectangle containing the mask in the view's interior (bounds) coordinate space.

The mask bounds allows the focus ring's overall size and position to be determined before it is drawn.
Subclasses must override this method if they require the display of a focus ring.
The NSView implementation of this method simply returns NSRectMBS.Zero.

Note: The information provided by focusRingMaskBounds will enable Accessibility to identify selected subelements for zoom tracking, so it is important that this method provide a reasonably tight bounding box and that noteFocusRingMaskChanged is invoked as described.

NSViewMBS.isDescendantOf(view as NSViewMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
True if the receiver is a subview of a given view or if it's identical to that view; otherwise, it returns false.

NSViewMBS.makeBackingLayer as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates the view's backing layer.

Value is a CALayerMBS object.
Available in OS X v10.6 and later.

NSViewMBS.nextValidKeyView as NSViewMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the closest view object in the key view loop that follows the receiver and accepts first responder status.

This method ignores hidden views when it determines the next valid key view.
Returns nil on any error.

NSViewMBS.noteFocusRingMaskChanged

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Invoked to notify the view that the focus ring mask requires updating.

It is important to note that it is only necessary for developers to invoke this method when some internal state change of their application, that the Application Kit can't determine, affects the shape of the focus ring mask.

It is assumed that if the view is marked as needing display, or is resized, its focus ring shape is likely to have changed, and there is no need for clients to explicitly send this message in such cases, they are handled automatically.

If, however, a view is showing a focus ring around some part of its content (an NSImage, perhaps), and that content changes, the client must provide notification by invoking this method so that focusRingMaskBounds and drawFocusRingMask will be invoked to redraw the focus ring.
Available in Mac OS X v10.7 and later.

Some examples using this method:

NSViewMBS.pageFooter as NSAttributedStringMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 12.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns a default footer string that includes the current page number and page count.

A printable view class can override this method to substitute its own content in place of the default value. You should not need to call this method directly. The printing system calls it once per page during printing.

Footers are generated only if the user defaults contain the key NSPrintHeaderAndFooter with the value true.

NSViewMBS.pageHeader as NSAttributedStringMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 12.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns a default header string that includes the print job title and date.

Typically, the print job title is the same as the window title. A printable view class can override this method to substitute its own content in place of the default value. You should not need to call this method directly. The printing system calls it once per page during printing.

Headers are generated only if the user defaults contain the key NSPrintHeaderAndFooter with the value true.

NSViewMBS.previousKeyView as NSViewMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the view object preceding the receiver in the key view loop.

This view should, if possible, be made first responder when the user navigates backward from the receiver using keyboard interface control.
Returns nil on any error.

NSViewMBS.previousValidKeyView as NSViewMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the closest view object in the key view loop that precedes the receiver and accepts first responder status.

This method ignores hidden views when it determines the previous valid key view.
Returns nil on any error.

NSViewMBS.print

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 12.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
This action method opens the Print panel, and if the user chooses an option other than canceling, prints the receiver and all its subviews to the device specified in the Print panel.

NSViewMBS.registeredDraggedTypes as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the array of pasteboard drag types that the view can accep
Example
// we register some types
Listbox1.AcceptPictureDrop
Listbox1.AcceptTextDrop

// and query them:
MsgBox Join(Listbox1.NSViewMBS.registeredDraggedTypes, EndOfLine)

' shows:
'NeXT TIFF v4.0 pasteboard type
'com.apple.traditional-mac-plain-text
'NSStringPboardType

This method returns the types registered by calling registerForDraggedTypes:. Each element of the array is a uniform type identifier. The returned elements are in no particular order, but the array is guaranteed not to contain duplicate entries.

NSViewMBS.registerForDraggedTypes(Types() as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Registers the pasteboard types that the receiver will accept as the destination of an image-dragging session.

Types: An array of uniform type identifiers. See Types for Standard Data (Mac OS X 10.6 and later) for descriptions of the pasteboard type identifiers.

Registering an NSView object for dragged types automatically makes it a candidate destination object for a dragging session. As such, it must properly implement some or all of the NSDraggingDestination protocol methods. As a convenience, NSView provides default implementations of these methods. See the NSDraggingDestination protocol specification for details.

Xojo with Cocoa target implements the methods listed above. So this method is useful to change the allowed types for the case the framework has a bug.

NSViewMBS.removeAllToolTips

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Removes all tool tips assigned to the receiver.

NSViewMBS.removeFromSuperview

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Unlinks the view from its superview and its window, removes it from the responder chain, and invalidates its cursor rectangles.

Some examples using this method:

NSViewMBS.removeFromSuperviewWithoutNeedingDisplay

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 12.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Unlinks the receiver from its superview and its window and removes it from the responder chain, but does not invalidate its cursor rectangles to cause redrawing.

The receiver is also released; if you plan to reuse it, be sure to retain it before sending this message and to release it as appropriate when adding it as a subview of another view.

Unlike its counterpart, removeFromSuperview, this method can be safely invoked during display.

Some examples using this method:

NSViewMBS.RenderImage(subviews as boolean = false, flipped as boolean = false) as variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Renders a picture of the view.
Example
dim n as new NSProgressIndicatorMBS
n.sizeToFit

dim image as NSImageMBS = n.RenderImage
dim pic as Picture = image.CopyPicture

Backdrop = pic

May return nil on any error.
The value of this variant must be an object of class NSImageMBS.

Added flipped parameter for version 20.3.
Flipped was true for older versions.

NSViewMBS.replaceSubview(oldView as NSViewMBS, newView as NSViewMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 12.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Replaces one of the receiver's subviews with another view.

oldView: The view to be replaced by newView. May not be nil.
newView: The view to replace oldView. May not be nil.

This method does nothing if oldView is not a subview of the receiver.
Neither oldView nor newView may be nil, and the behavior is undefined if either of these parameters is nil.

Next items

The items on this page are in the following plugins: MBS MacBase Plugin.


The biggest plugin in space...