阶段性完成
This commit is contained in:
+31
-1
@@ -13,7 +13,7 @@
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
self.palybackVideo.image = LXImageWithImageName(@"playback_iocn_video");
|
||||
self.playImageView.image = LXImageWithImageName(@"playback_iocn_video");
|
||||
|
||||
}
|
||||
|
||||
@@ -22,5 +22,35 @@
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
-(void)setModel:(GWPlaybackFileModel *)model
|
||||
{
|
||||
_model=model;
|
||||
|
||||
NSString*start=[NSString stringWithFormat:@"%ld%02ld%02ld%02ld%02ld",model.year,model.month,model.day,model.hour,model.minute];
|
||||
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
|
||||
formatter.dateFormat = @"yyyyMMddHHmm";
|
||||
NSDate*date=[formatter dateFromString:start];
|
||||
|
||||
NSString*end=[NSString stringWithFormat:@"%ld%02ld%02ld%02ld%02ld",model.year,model.month,model.day,model.hour,model.minute];
|
||||
if (date)
|
||||
{
|
||||
if ([model.cType isEqualToString:@"S"])
|
||||
{
|
||||
date=[date dateByAddingTimeInterval:model.time];
|
||||
}
|
||||
else
|
||||
{
|
||||
date=[date dateByAddingTimeInterval:model.time*60];
|
||||
}
|
||||
end=[formatter stringFromDate:date];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
self.startTimeLabel.text=start;
|
||||
self.endTimeLabel.text=end;
|
||||
NSLog(@"date =%@ time=%ld",model.date,model.time);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user