Skip to content

Commit

Permalink
Fix warnings in NotificationCenter+Utils (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
alemannosara authored Jan 17, 2024
1 parent 79aa202 commit 1b35a0c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.0.16] - 2023

### Fixed
- Fix warnings in `NotificationCenter+Utils`

## [0.0.15] - 2023-01-13

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ extension NotificationCenter {
/// - name: The name of the notification to register for delivery to the observer.
/// Specify a notification name to deliver only entries with this notification name.
/// When nil, the sender doesn’t use notification names as criteria for the delivery.
open func addObserver(_ observer: Any, selector: Selector, name: NSNotification.Name?) {
public func addObserver(_ observer: Any, selector: Selector, name: NSNotification.Name?) {
addObserver(observer, selector: selector, name: name, object: nil)
}

/// Creates a notification with a given name, sender, and information and posts it to the notification center.
/// - Parameters:
/// - name: The name of the notification.
/// - userInfo: Optional information about the the notification.
open func post(name: NSNotification.Name, userInfo: [AnyHashable: Any]? = nil) {
public func post(name: NSNotification.Name, userInfo: [AnyHashable: Any]? = nil) {
post(name: name, object: nil, userInfo: userInfo)
}

Expand All @@ -37,7 +37,7 @@ extension NotificationCenter {
/// - name: The name of the notification to remove from the dispatch table.
/// Specify a notification name to remove only entries with this notification name.
/// When nil, the receiver does not use notification names as criteria for removal.
open func removeObserver(_ observer: Any, name: NSNotification.Name?) {
public func removeObserver(_ observer: Any, name: NSNotification.Name?) {
removeObserver(observer, name: name, object: nil)
}
}

0 comments on commit 1b35a0c

Please sign in to comment.