Skip to content

Commit 85aad80

Browse files
Update README.md
1 parent 78c5517 commit 85aad80

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,26 @@ QTLoginEvent * event;
7272
[QTEventBus.shared dispatch:event];
7373
```
7474

75+
### 字符串
76+
77+
有些事件发生的时候并不需要携带参数,这时候用类来传递就显得多余,可以直接直接用字符串来代表事件:
78+
79+
订阅
80+
81+
```
82+
[QTSubName(self,"ButtonClick") next:^(NSString * event) {
83+
84+
}];
85+
```
86+
87+
发布
88+
89+
```
90+
[[QTEventBus shared] dispatch:@"ButtonClick"];
91+
```
92+
93+
94+
7595
## 详细文档
7696

7797
- [核心功能](./Doc/Basic.md)

0 commit comments

Comments
 (0)