-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSWViewController.m
More file actions
38 lines (32 loc) · 783 Bytes
/
SWViewController.m
File metadata and controls
38 lines (32 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
// SWViewController.m
// SWSocketManager
//
// Created by k721684713@163.com on 10/17/2017.
// Copyright (c) 2017 k721684713@163.com. All rights reserved.
//
#import "SWViewController.h"
#import "SWSocketManager.h"
@interface SWViewController ()
@property (weak, nonatomic) IBOutlet UITextField *textField;
@end
@implementation SWViewController
- (IBAction)connect:(id)sender {
[[SWSocketManager share] connect];
}
- (IBAction)disconnect:(id)sender {
[[SWSocketManager share]disConnect];
}
- (IBAction)sendMsg:(id)sender {
[[SWSocketManager share] sendMsg:_textField.text];
}
- (void)viewDidLoad
{
[super viewDidLoad];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end