萤石云 iOSSDK,移植跨平台相关工程
JLChen
2021-07-09 1a27ef122fb0a2b9f1c19dd609897728b795df5d
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
//
//  EZMessagePhotoViewController.m
//  EZOpenSDKDemo
//
//  Created by DeJohn Dong on 15/11/16.
//  Copyright © 2015年 Ezviz. All rights reserved.
//
 
#import "EZMessagePhotoViewController.h"
#import "EZMessagePlaybackViewController.h"
 
@interface EZMessagePhotoViewController ()<MWPhotoBrowserDelegate>
 
@property (nonatomic, weak) IBOutlet UIView *messageDetailInfoView;
@property (nonatomic, weak) IBOutlet UILabel *titleLabel;
@property (nonatomic, weak) IBOutlet UILabel *timeLabel;
@property (nonatomic, weak) IBOutlet UILabel *contentLabel;
@property (nonatomic, weak) IBOutlet UIButton *recordButton;
 
@end
 
@implementation EZMessagePhotoViewController
 
- (void)viewDidLoad {
    
    self.delegate = self;
    self.displayActionButton = NO;
    self.displaySelectionButtons = NO;
    
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    [self.view bringSubviewToFront:self.messageDetailInfoView];
    
    NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
    formatter.dateFormat = @"yyyy/MM/dd HH:mm:ss";
    self.timeLabel.text = [formatter stringFromDate:[self.info getAlarmStartTime]];
    self.contentLabel.text = [NSString stringWithFormat:@"%@:%@",NSLocalizedString(@"message_from", @"来自"),self.info.alarmName];
    
    [self.recordButton setHidden:YES];
}
 
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
 
 
#pragma mark - Navigation
 
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
//    HDLAlarmInfo *info = sender;
//    
//    EZMessagePlaybackViewController *messagePlaybackVC = [segue destinationViewController];
//    messagePlaybackVC.info = info;
//    messagePlaybackVC.deviceInfo = self.deviceInfo;
    
}
 
#pragma mark - MWPhotoBrowserDelegate Methods
 
- (NSUInteger)numberOfPhotosInPhotoBrowser:(MWPhotoBrowser *)photoBrowser
{
    return 1;
}
 
- (id <MWPhoto>)photoBrowser:(MWPhotoBrowser *)photoBrowser photoAtIndex:(NSUInteger)index
{
    MWPhoto *photo = [[MWPhoto alloc] initWithImage:_image];
    return photo;
}
 
 
- (void)updateNavigation
{
    self.title = NSLocalizedString(@"message_detail", @"消息详情");
}
 
- (IBAction)go2Next:(id)sender
{
    [self performSegueWithIdentifier:@"go2MessagePlayback" sender:self.info];
}
 
@end