Tags
public protocol Tags : AnyObject
Protocol for activity involving sound font tags.
-
True if the tags collection has been restored
Declaration
Swift
var restored: Bool { get }
-
True if there are no tags in the collection
Declaration
Swift
var isEmpty: Bool { get }
-
The number of tags in the collection
Declaration
Swift
var count: Int { get }
-
Get the tag at a given index.
Declaration
Swift
func getBy(index: Int) -> LegacyTag
Parameters
index
the index to fetch
-
Add a tag to the collection.
Declaration
Swift
func append(_ tag: LegacyTag) -> Int
Parameters
tag
the tag to add
Return Value
index of the new tag
-
Remove the tag at the given index.
Declaration
Swift
@discardableResult func remove(at index: Int) -> LegacyTag
Parameters
index
the index to remove
Return Value
tag that was removed
-
Rename a tag.
Declaration
Swift
func rename(_ index: Int, name: String)
Parameters
index
the index of the tag to rename
name
the new name to use
-
Insert a tag at the given index
Declaration
Swift
func insert(_ tag: LegacyTag, at index: Int)
Parameters
tag
the tag to insert
index
the location to insert it
-
Allow subscriptions for tag collection changes.
Declaration
Swift
@discardableResult func subscribe<O: AnyObject>(_ subscriber: O, notifier: @escaping (TagsEvent) -> Void) -> SubscriberToken
Parameters
subscriber
the object that is subscribing
notifier
the function or closure to invoke when an even takes place
Return Value
token that identifies the subscription and can be used to unsubscribe
-
Undocumented
Declaration
Swift
func validate()