-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
93c72da
commit 0bb8d02
Showing
1 changed file
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,45 @@ | ||
#BJNotification | ||
# BJNotification | ||
[![CocoaPods](https://img.shields.io/cocoapods/v/BJNotification.svg)](https://img.shields.io/cocoapods/v/BJNotification.svg) | ||
[![twitter](https://img.shields.io/badge/[email protected]?style=flat)](https://twitter.com/beijiahiddink) | ||
[![weibo](https://img.shields.io/badge/[email protected]?style=flat)](http://weibo.com/u/3788698095) | ||
[![mail](https://img.shields.io/badge/[email protected]?style=flat)](mailto://[email protected]) | ||
|
||
##什么是BJNotification | ||
## 什么是BJNotification | ||
本项目高仿`NSNotification`框架。 | ||
|
||
##如何安装 | ||
###CocoaPods | ||
## 如何安装 | ||
### CocoaPods | ||
```ruby | ||
platform :ios, '7.0' | ||
|
||
target 'TargetName' do | ||
pod 'BJNotification', '~> 1.0' | ||
end | ||
``` | ||
###手动安装 | ||
### 手动安装 | ||
```ruby | ||
git clone https://github.com/beijiahiddink/BJNotification.git | ||
open BJNotification | ||
``` | ||
##该怎样去使用 | ||
## 该怎样去使用 | ||
使用方式大体与`NSNotification`使用类似,整个框架是线程安全的。 | ||
###通知注册方法 | ||
### 通知注册方法 | ||
```objective-c | ||
[[BJNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveTip:) name:@"TipNotification" object:nil]; | ||
``` | ||
###通知发送方法 | ||
### 通知发送方法 | ||
```objective-c | ||
[[BJNotificationCenter defaultCenter] postNotificationName:@"TipNotification" object:nil]; | ||
``` | ||
|
||
###清理注册人 | ||
### 清理注册人 | ||
```objective-c | ||
[[BJNotificationCenter defaultCenter] removeObserver:self]; | ||
``` | ||
|
||
##最后 | ||
## 最后 | ||
喜欢本项目的可以给我[加星](https://github.com/beijiahiddink/BJNotification/stargazers)哦! | ||
|
||
##License | ||
## License | ||
BJNotification is released under the MIT license. See [LICENSE](LICENSE) for details |