CNLIVEViewController.m
2.17 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//
// CNLIVEViewController.m
// CNLiveSendPositonModule
//
// Created by 郭瑞朋 on 11/19/2019.
// Copyright (c) 2019 郭瑞朋. All rights reserved.
//
#import "CNLIVEViewController.h"
#import "CNLiveServices.h"
#import "CNLiveMapViewController.h"
#import <MapKit/MapKit.h>
@interface CNLIVEViewController ()<CNLiveMapPositionDelegate>
@property (nonatomic, assign)CLLocationCoordinate2D templocation;
@property (nonatomic, copy) NSString *tempImg;
@property (nonatomic, strong) NSArray *tempArr;
@end
@implementation CNLIVEViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
btn.backgroundColor = [UIColor redColor];
btn.frame = CGRectMake(100, 100, 100, 100);
[self.view addSubview:btn];
[btn addTarget:self action:@selector(btnAction) forControlEvents:UIControlEventTouchUpInside];
UIButton *btn1 = [UIButton buttonWithType:UIButtonTypeCustom];
btn1.backgroundColor = [UIColor redColor];
btn1.frame = CGRectMake(100, 100+200, 100, 100);
[self.view addSubview:btn1];
[btn1 addTarget:self action:@selector(btnAction1) forControlEvents:UIControlEventTouchUpInside];
}
- (void)btnAction{
id<CNLiveSendPositionProtocol> service = [[BeeHive shareInstance] createService:@protocol(CNLiveSendPositionProtocol)];
[service pushToMapViewController:self];
}
- (void)btnAction1{
id<CNLiveSendPositionProtocol> service = [[BeeHive shareInstance] createService:@protocol(CNLiveSendPositionProtocol)];
[service pushToMapDetailViewController:self location:self.templocation image:self.tempImg addressName:self.tempArr];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (void)sendCurrentLocation:(CLLocationCoordinate2D)location image:(nonnull NSString *)img addressName:(nonnull NSArray *)arr {
NSLog(@"");
self.templocation = location;
self.tempImg = img;
self.tempArr = arr;
}
-(void)forwardingLocation:(CLLocationCoordinate2D)location image:(NSString *)img addressName:(NSArray *)arr{
NSLog(@"");
}
@end