Commit e4ec6074 authored by 曹云霄's avatar 曹云霄

Merge branch 'master' of https://git.oschina.net/gomore/Opple-iOS

parents a78c18b9 faa497b2
......@@ -57,4 +57,14 @@
*/
@property (nonatomic,strong) CustomTOForumReplyEntity *replyEntity;
/**
附件栏
*/
@property (weak, nonatomic) IBOutlet UIView *attachmentView;
/**
附件栏高度
*/
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *layoutAttHeight;
@end
......@@ -7,7 +7,10 @@
//
#import "CommentListTableViewCell.h"
#import "MWPhotoBrowser.h"
@interface CommentListTableViewCell ()<MWPhotoBrowserDelegate>
@property (nonatomic,strong) NSMutableArray *browserArray;
@end
@implementation CommentListTableViewCell
- (void)awakeFromNib {
......@@ -20,8 +23,50 @@
make.size.mas_equalTo(CGSizeMake(0, 30));
make.centerY.equalTo(self.optionButton);
}];
for (UIImageView *obj in self.attachmentView.subviews) {
if ([obj isKindOfClass:[UIImageView class]]) {
obj.userInteractionEnabled = YES;
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapImage:)];
[obj addGestureRecognizer:tap];
}
}
}
- (void)tapImage:(UIGestureRecognizer *)tap {
if (tap.view.tag + 1 > self.replyEntity.attachments.count) {
return;
}
[self.browserArray removeAllObjects];
for (TOAttachmentEntity *att in self.replyEntity.attachments) {
MWPhoto *photo = [MWPhoto photoWithURL:[NSURL URLWithString:att.fileUrl]];
[self.browserArray addObject:photo];
}
MWPhotoBrowser *browser = [[MWPhotoBrowser alloc] initWithDelegate:self];
[browser setCurrentPhotoIndex:tap.view.tag];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:browser];
[self.viewController.navigationController presentViewController:nav animated:YES completion:nil];
}
#pragma mark - <MWPhotoBrowserDelegate>
- (NSUInteger)numberOfPhotosInPhotoBrowser:(MWPhotoBrowser *)photoBrowser
{
return self.browserArray.count;
}
- (id<MWPhoto>)photoBrowser:(MWPhotoBrowser *)photoBrowser photoAtIndex:(NSUInteger)index
{
if (index < self.browserArray.count) {
return [self.browserArray objectAtIndex:index];
}
return nil;
}
- (NSString *)photoBrowser:(MWPhotoBrowser *)photoBrowser titleForPhotoAtIndex:(NSUInteger)index
{
return [NSString stringWithFormat:@"%ld/%ld", index + 1, self.browserArray.count];
}
#pragma mark - 选项按钮
- (IBAction)extensionButtonClickAction:(UIButton *)sender {
if (self.bestView.width != 0) {
......@@ -49,6 +94,26 @@
self.bestView.isBest = _replyEntity.best;
self.bestView.indexPath = self.indexPath;
self.baseImageView.hidden = !_replyEntity.best;
if (replyEntity.attachments.count > 0) {
self.layoutAttHeight.constant = 164;
}else{
self.layoutAttHeight.constant = 0;
}
for (NSInteger i = 0; i < replyEntity.attachments.count; i++) {
TOAttachmentEntity *att = replyEntity.attachments[i];
UIImageView *imgView = (UIImageView *)[self.attachmentView viewWithTag:i];
[imgView sd_setImageWithURL:[NSURL URLWithString:att.fileUrl] placeholderImage:REPLACEIMAGE];
}
}
#pragma mark - lazy
- (NSMutableArray *)browserArray
{
if (!_browserArray) {
_browserArray = [NSMutableArray array];
}
return _browserArray;
}
@end
......@@ -13,13 +13,12 @@
- (void)awakeFromNib {
[super awakeFromNib];
[self setUpToolView];
}
#pragma mark - ToolView
- (void)setUpToolView
{
- (void)setUpToolView {
KeyBoardAccessoryView *toolView = [[KeyBoardAccessoryView alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth, 44)];
toolView.delegate = self;
self.contentTextView.inputAccessoryView = toolView;
......@@ -27,45 +26,37 @@
}
#pragma mark - Click
- (void)extensionButtonClick:(UIButton *)sender
{
- (void)extensionButtonClick:(UIButton *)sender {
switch (sender.tag) {
case Camera:
{
case Camera: {
if ([self.delgate respondsToSelector:@selector(showCameraAction)]) {
[self.delgate showCameraAction];
}
}
break;
case PhotoAlbum:
{
} break;
case PhotoAlbum: {
if ([self.delgate respondsToSelector:@selector(showPhotoAlbumAction)]) {
[self.delgate showPhotoAlbumAction];
}
}
break;
case Emoji:
{
} break;
case Emoji: {
sender.selected = !sender.selected;
if (sender.selected) {
[[STEmojiKeyboard keyboard] setTextView:self.contentTextView];
}else {
} else {
[self.contentTextView setInputView:nil];
}
[self.contentTextView reloadInputViews];
[self.contentTextView becomeFirstResponder];
}
break;
} break;
default:
break;
}
}
#pragma mark - <UITextViewDelegate>
- (void)textViewDidEndEditing:(UITextView *)textView
{
- (void)textViewDidEndEditing:(UITextView *)textView {
self.heightConstraint.constant = [self calculateStudyIntroductionHeight:textView.text];
if ([self.delgate respondsToSelector:@selector(refreshHeight:)]) {
[self.delgate refreshHeight:self.contentTextView.height];
......@@ -73,22 +64,9 @@
}
#pragma mark - 计算高度
- (CGFloat)calculateStudyIntroductionHeight:(NSString *)content
{
return [content heightWithFontSize:14 width:ScreenWidth-40]+20;
- (CGFloat)calculateStudyIntroductionHeight:(NSString *)content {
return [content heightWithFontSize:14 width:ScreenWidth - 40] + 20;
}
@end
......@@ -75,7 +75,7 @@
TOForumCategoryEntity *category = self.result.list[indexPath.row];
category.typeId = self.result.forumType.fid;
itemListVc.category = category;
itemListVc.isPosting = [category.name isEqualToString:@"欧普问问"]?0:1;
itemListVc.isPosting = [category.name isEqualToString:@"欧普问问"]?2:1;
[self.navigationController pushViewController:itemListVc animated:YES];
}
......
......@@ -13,7 +13,11 @@
#import "WkWebViewViewController.h"
#import "AnnouncementContentTableViewCell.h"
#import "ForumDetailPhotoTableViewCell.h"
#import "ZJKeyBoardAccessoryView.h"
#import "ForumDetailBottomView.h"
#import "OSSHelper.h"
#import "ForumCommentListViewModel.h"
#import "UIImage+Helper.h"
@interface ForumItemDetailViewController ()<UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate,TapClickDelegate,ReturnTableviewcellIndexpathdelegate>
......@@ -70,6 +74,13 @@
@property (nonatomic,strong) ForumReplyCondition *condition;
/**
底部的view
*/
@property (weak, nonatomic) IBOutlet ForumDetailBottomView *bottomView;
@end
@implementation ForumItemDetailViewController
......@@ -118,6 +129,10 @@
[self.forumDetailTableView registerClass:[ForumDetailPhotoTableViewCell class] forCellReuseIdentifier:@"ForumDetailPhotoTableViewCell"];
[self setUpHeaderView];
self.forumDetailTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
self.commentInputTextFieldView.inputAccessoryView = self.bottomView.toolView;
}
#pragma mark - WKWebView/photoManager
......@@ -157,7 +172,12 @@
weakSelf.commentsArray = nil;
}
weakSelf.topicReply = [[ForumReplyResponse alloc] initWithDictionary:RESPONSE(returnValue) error:nil];
[weakSelf.commentsArray addObjectsFromArray:weakSelf.topicReply.forumReplyEntity];
for (CustomTOForumReplyEntity *entity in weakSelf.topicReply.forumReplyEntity) {
ForumCommentListViewModel *model = [ForumCommentListViewModel new];
model.replyEntity = entity;
[weakSelf.commentsArray addObject:model];
}
[weakSelf setUpCommentNumber];
[weakSelf.forumDetailTableView reloadData];
}else {
......@@ -217,7 +237,8 @@
CommentListTableViewCell *commentCell = [tableView dequeueReusableCellWithIdentifier:@"CommentListTableViewCell" forIndexPath:indexPath];
commentCell.bestView.delegate = self;
commentCell.indexPath = indexPath;
commentCell.replyEntity = self.commentsArray[indexPath.row];
ForumCommentListViewModel *cellModel = self.commentsArray[indexPath.row];
commentCell.replyEntity = cellModel.replyEntity;
BOOL boolValue = ([self.topicDetail.posterId isEqualToString:[Shoppersmanager manager].shoppers.employee.fid] && [self.category.name isEqualToString:OPPLE_ASK]);
commentCell.optionButton.hidden = !boolValue;
return commentCell;
......@@ -243,9 +264,9 @@
}
break;
}
CustomTOForumReplyEntity *replyEntity = self.commentsArray[indexPath.row];
ForumCommentListViewModel *cellModel = self.commentsArray[indexPath.row];
//68为上边距 10为下边距
return replyEntity.replyContentHeight + 68 + 10;
return cellModel.height;
}
- (void)tableView:(UITableView *)tableView didEndDisplayingCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
......@@ -283,6 +304,8 @@
#pragma mark - 确认回复
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
[[UIApplication sharedApplication].keyWindow endEditing:YES];
if ([[self class] isBlankString:textField.text]) {
[XBLoadingView showHUDViewWithText:@"评论内容不能为空"];
}else {
......@@ -291,18 +314,91 @@
return YES;
}
#pragma mark - 上传图片附件
- (void)uploadAttachments:(void(^)(NSArray *OSSKeys))finish
{
if (self.bottomView.toolView.arrSelectedPhotos.count == 0) {
finish(nil);
return;
}
NSMutableArray *OSSKeyArray = [NSMutableArray array];
for (int i=0; i<self.bottomView.toolView.arrSelectedPhotos.count; i++) {
[OSSKeyArray addObject:[OSSHelper getOSSObjectKeyWithtype:@"jpg" index:i]];
}
XBLoadingView *loadView = [XBLoadingView showHUDViewProgressLabel:[NSString stringWithFormat:@"图片上传中:1/%ld",self.bottomView.toolView.arrSelectedPhotos.count]];
static NSInteger number = 0;
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
for (int i=0;i<self.bottomView.toolView.arrSelectedPhotos.count;i++) {
UIImage *image = self.bottomView.toolView.arrSelectedPhotos[i];
NSString *ossKey = OSSKeyArray[i];
UIImage *newSizeImage = [image scaledToWidth:1024];
NSData *data = [newSizeImage scaledToSpaceMaxSize:200];
[OSSHelper uploadImageObjectWithKey:ossKey data:data type:OSSHelperOperationTypeSynchronous progress:^(int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend) {
CGFloat totalBytesSentFloat = totalBytesSent;
CGFloat totalBytesExpectedToSendFloat = totalBytesExpectedToSend;
CGFloat progress = totalBytesSentFloat / totalBytesExpectedToSendFloat;
NSLog(@"-->进度%f", progress);
loadView.progress = progress;
} success:^id(OSSTask *task) {
number ++;
loadView.labelText = [NSString stringWithFormat:@"图片上传中:%ld/%ld",number,self.self.bottomView.toolView.arrSelectedPhotos.count];
if (number == self.bottomView.toolView.arrSelectedPhotos.count) {
number = 0;
dispatch_async(dispatch_get_main_queue(), ^{
[loadView hide:YES];
[XBLoadingView showHUDViewWithSuccessText:@"图片上传成功" completeBlock:^{
finish(OSSKeyArray);
}];
});
}
return nil;
} error:^(NSError *error) {
[XBLoadingView hideHUDViewWithDefault];
[XBLoadingView showHUDViewWithText:error.localizedDescription];
}];
}
});
}
#pragma mark - 回复帖子
- (void)replyPostRequest
{
[self.view endEditing:YES];
TOForumReplyEntity *reply = [[TOForumReplyEntity alloc] init];
reply.topicId = self.topicDetail.fid;
reply.replyContent = self.commentInputTextFieldView.text;
reply.replyerName = [Shoppersmanager manager].shoppers.employee.userName;
reply.replyerRealName = [Shoppersmanager manager].shoppers.employee.realName;
reply.replyerPosition = [Shoppersmanager manager].shoppers.employee.positionsName;
reply.replyTime = [[self class] getTimeby:0];
reply.replyerId = [Shoppersmanager manager].shoppers.employee.fid;
WS(weakSelf);
[self uploadAttachments:^(NSArray *OSSKeys) {
NSLog(@"%@", OSSKeys);
TOForumReplyEntity *reply = [[TOForumReplyEntity alloc] init];
reply.topicId = self.topicDetail.fid;
reply.replyContent = self.commentInputTextFieldView.text;
reply.replyerName = [Shoppersmanager manager].shoppers.employee.userName;
reply.replyerRealName = [Shoppersmanager manager].shoppers.employee.realName;
reply.replyerPosition = [Shoppersmanager manager].shoppers.employee.positionsName;
reply.replyTime = [[self class] getTimeby:0];
reply.replyerId = [Shoppersmanager manager].shoppers.employee.fid;
NSMutableArray *attachments = [NSMutableArray array];
NSString *entityId = [OSSHelper getOSSObjectKey];
reply.attachmentId = entityId;
for (NSString *ossKey in OSSKeys) {
TOAttachmentEntity *entity = [[TOAttachmentEntity alloc] init];
entity.entityType = @"forumReply";
entity.entityId = entityId;
entity.fileUrl = [OSSHelper getCompleteImageURLWithOSSkey:ossKey];
entity.fileName = ossKey;
[attachments addObject:entity];
}
reply.attachments = (NSArray<TOAttachmentEntity>*)attachments;
[weakSelf httpSubmit:reply complete:nil];
}];
}
- (void)httpSubmit:(TOForumReplyEntity *)reply complete:(void (^)(void))complete {
[XBLoadingView showHUDViewWithDefault];
WS(weakSelf);
[HTTP networkRequestWithURL:SERVERREQUESTURL(REPLYPOST) withRequestType:ZERO withParameter:reply withReturnValueBlock:^(id returnValue) {
......@@ -310,6 +406,7 @@
[XBLoadingView hideHUDViewWithDefault];
if (RESULT(returnValue)) {
weakSelf.commentInputTextFieldView.text = nil;
[weakSelf.bottomView clearPhoto];
[XBLoadingView showHUDViewWithSuccessText:@"评论成功" completeBlock:^{
if (weakSelf.refreshBlock) {
weakSelf.refreshBlock(ONE,Comment,weakSelf.indexPath);
......
//
// ForumCommentListViewModel.h
// Lighting
//
// Created by Javen on 2017/4/18.
// Copyright © 2017年 上海勾芒科技有限公司. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface ForumCommentListViewModel : NSObject
/**
回复数据源
*/
@property (nonatomic,strong) CustomTOForumReplyEntity *replyEntity;
@property (nonatomic, assign) CGFloat height;
@end
//
// ForumCommentListViewModel.m
// Lighting
//
// Created by Javen on 2017/4/18.
// Copyright © 2017年 上海勾芒科技有限公司. All rights reserved.
//
#import "ForumCommentListViewModel.h"
static UILabel *stringLabel = nil;
@implementation ForumCommentListViewModel
- (void)setReplyEntity:(CustomTOForumReplyEntity *)replyEntity {
_replyEntity = replyEntity;
self.height = 88;
if (replyEntity.attachments.count > 0) {
self.height = 88 + 164;
}
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{ //生成一个用于计算文本高度的label
stringLabel = [[UILabel alloc] init];
stringLabel.font = [UIFont systemFontOfSize:17];
stringLabel.numberOfLines = 0;
});
stringLabel.text = replyEntity.replyContent;
self.height = self.height + [stringLabel sizeThatFits:CGSizeMake(ScreenWidth - 40, MAXFLOAT)].height + 16;
NSLog(@"%f", self.height);
}
@end
//
// ForumDetailBottomPictureCell.h
// Lighting
//
// Created by Javen on 2017/4/17.
// Copyright © 2017年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ForumDetailBottomPictureCell : UICollectionViewCell
@property (weak, nonatomic) IBOutlet UIImageView *imageView;
@property (copy, nonatomic) void (^blockDelete)(void);
@end
//
// ForumDetailBottomPictureCell.m
// Lighting
//
// Created by Javen on 2017/4/17.
// Copyright © 2017年 上海勾芒科技有限公司. All rights reserved.
//
#import "ForumDetailBottomPictureCell.h"
@implementation ForumDetailBottomPictureCell
- (IBAction)actionDelete:(UIButton *)sender {
if (self.blockDelete) {
self.blockDelete();
}
}
@end
//
// ForumDetailBottomView.h
// Lighting
//
// Created by Javen on 2017/4/17.
// Copyright © 2017年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "ZJKeyBoardAccessoryView.h"
@interface ForumDetailBottomView : UIView<UICollectionViewDelegate, UICollectionViewDataSource>
@property (weak, nonatomic) IBOutlet UICollectionView *collectionView;
@property (weak, nonatomic) IBOutlet UICollectionViewFlowLayout *layout;
/**
输入框toolbar
*/
@property (strong, nonatomic) ZJKeyBoardAccessoryView *toolView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *layoutHeight;
- (void)clearPhoto;
@end
//
// ForumDetailBottomView.m
// Lighting
//
// Created by Javen on 2017/4/17.
// Copyright © 2017年 上海勾芒科技有限公司. All rights reserved.
//
#import "ForumDetailBottomView.h"
#import "ForumDetailBottomPictureCell.h"
@implementation ForumDetailBottomView
- (void)awakeFromNib {
[super awakeFromNib];
self.collectionView.delegate = self;
self.collectionView.dataSource = self;
self.layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
self.layout.itemSize = CGSizeMake(64, 64);
self.layout.sectionInset = UIEdgeInsetsMake(0, 30, 0, 30);
self.toolView = [[ZJKeyBoardAccessoryView alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth, 44)];
self.layoutHeight.constant = 50;
//结束选择照片 (删除照片时这里也会回调)
WS(weakSelf);
self.toolView.blockFinishSelected = ^{
[weakSelf.collectionView reloadData];
if (weakSelf.toolView.arrSelectedPhotos.count > 0) {
weakSelf.layoutHeight.constant = 114;
}else{
weakSelf.layoutHeight.constant = 50;
}
};
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
return self.toolView.arrSelectedPhotos.count;
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
ForumDetailBottomPictureCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"ForumDetailBottomPictureCell" forIndexPath:indexPath];
UIImage *image = self.toolView.arrSelectedPhotos[indexPath.row];
cell.imageView.image = image;
WS(weakSelf);
cell.blockDelete = ^{
ShowAlertView(weakSelf.viewController, nil, @"确认删除", @"取消", @"确认", UIAlertControllerStyleAlert, ^{
NSLog(@"删除");
[weakSelf.toolView deletePhotoWithIndex:indexPath.row];
},
nil);
};
return cell;
}
- (void)clearPhoto {
[self.toolView deleteAll];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
......@@ -27,6 +27,7 @@
CGFloat interval = 30;
for (int i=0; i<itemArray.count; i++) {
UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
// button.imageView
button.tag = i;
button.tintColor = [UIColor whiteColor];
[button setBackgroundImage:TCImage(itemArray[i]) forState:UIControlStateNormal];
......
//
// ZJKeyBoardAccessoryView.h
// Lighting
//
// Created by Javen on 2017/4/17.
// Copyright © 2017年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ZJKeyBoardAccessoryView : UIView
@property (strong, nonatomic) NSMutableArray *arrSelectedAssets;
@property (strong, nonatomic) NSMutableArray *arrSelectedPhotos;
@property (nonatomic, copy) void (^blockFinishSelected)(void);
/**
删除指定下标的图片
@param index 下标
*/
- (void)deletePhotoWithIndex:(NSInteger)index;
/**
删除所有的图片
*/
- (void)deleteAll;
@end
//
// ZJKeyBoardAccessoryView.m
// Lighting
//
// Created by Javen on 2017/4/17.
// Copyright © 2017年 上海勾芒科技有限公司. All rights reserved.
//
#import "ZJKeyBoardAccessoryView.h"
#import "STEmojiKeyboard.h"
#import <AssetsLibrary/AssetsLibrary.h>
#import <Photos/Photos.h>
#import "MWPhotoBrowser.h"
/**
扩展项
- Camera: 相机
- PhotoAlbum: 相册
- Emoji: 表情
*/
typedef NS_ENUM(NSInteger, ItemIndex) {
Camera = 0,
PhotoAlbum,
Emoji,
};
@interface ZJKeyBoardAccessoryView () <UIImagePickerControllerDelegate, UINavigationControllerDelegate, MWPhotoBrowserDelegate>
@property (strong, nonatomic) NSMutableArray *allPhotoArray;
/**
*/
@property (strong, nonatomic) NSMutableArray *mwPhotoArray;
/**
缩略图
*/
@property (strong, nonatomic) NSMutableArray *thumbsArray;
@property (strong, nonatomic) NSMutableDictionary *cache;
@end
@implementation ZJKeyBoardAccessoryView
- (instancetype)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
self.backgroundColor = [UIColor whiteColor];
[self uiConfigAction];
}
return self;
}
#pragma mark - UI
- (void)uiConfigAction {
NSArray *itemArray = @[ @"camera", @"album" ];
CGFloat size = 25;
CGFloat interval = 30;
for (int i = 0; i < itemArray.count; i++) {
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
// button.imageView
button.tag = i;
// button.tintColor = [UIColor whiteColor];
[button setImage:TCImage(itemArray[i]) forState:UIControlStateNormal];
button.frame = CGRectMake(i * size + i * interval + 50, (self.height - size) / 2, size, size);
[button addTarget:self action:@selector(extensionButtonClick:) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:button];
}
}
- (void)extensionButtonClick:(UIButton *)btn {
switch (btn.tag) {
case Camera: {
[self showCameraAction];
} break;
case PhotoAlbum: {
[self selectAlbumImage];
} break;
default:
break;
}
}
#pragma mark - 拍照选择照片
- (void)showCameraAction {
if ([BaseViewController determineCameraPermissions]) {
UIImagePickerController *camera = [[UIImagePickerController alloc] init];
camera.delegate = self;
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
[camera setSourceType:UIImagePickerControllerSourceTypeCamera];
camera.allowsEditing = YES;
[self.viewController presentViewController:camera animated:YES completion:nil];
} else {
[XBLoadingView showHUDViewWithText:@"相机无法使用"];
}
} else {
UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"提示" message:@"请在iPad的“设置-隐私-相机”选项中,允许欧立方访问你的相机" preferredStyle:UIAlertControllerStyleAlert];
[alertVC addAction:[UIAlertAction actionWithTitle:@"知道了" style:UIAlertActionStyleCancel handler:nil]];
[self.viewController presentViewController:alertVC animated:YES completion:nil];
}
}
#pragma mark - <UIImagePickerControllerDelegate>
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *, id> *)info {
[picker dismissViewControllerAnimated:YES completion:nil];
UIImage *headImage = [info objectForKey:UIImagePickerControllerOriginalImage];
// [self.selectedImageArray addObject:headImage];
// [self.publishTableView reloadData];
[self.arrSelectedPhotos addObject:headImage];
if (self.blockFinishSelected) {
self.blockFinishSelected();
}
}
#pragma mark - 相册选择照片
#pragma mark - MWPhotoBrowserDelegate
- (NSUInteger)numberOfPhotosInPhotoBrowser:(MWPhotoBrowser *)photoBrowser {
return self.mwPhotoArray.count;
}
- (id<MWPhoto>)photoBrowser:(MWPhotoBrowser *)photoBrowser photoAtIndex:(NSUInteger)index {
if (index < self.mwPhotoArray.count)
return [self.mwPhotoArray objectAtIndex:index];
return nil;
}
- (id<MWPhoto>)photoBrowser:(MWPhotoBrowser *)photoBrowser thumbPhotoAtIndex:(NSUInteger)index {
if (index < self.thumbsArray.count)
return [self.thumbsArray objectAtIndex:index];
return nil;
}
- (BOOL)photoBrowser:(MWPhotoBrowser *)photoBrowser isPhotoSelectedAtIndex:(NSUInteger)index {
PHAsset *currentPhoto = self.allPhotoArray[index];
return [self.arrSelectedAssets containsObject:currentPhoto];
}
- (void)photoBrowser:(MWPhotoBrowser *)photoBrowser photoAtIndex:(NSUInteger)index selectedChanged:(BOOL)selected {
PHAsset *currentPhoto = self.allPhotoArray[index];
if (selected) {
PHImageManager *imageManager = [PHImageManager defaultManager];
PHImageRequestOptions *options = [PHImageRequestOptions new];
options.networkAccessAllowed = YES;
options.resizeMode = PHImageRequestOptionsResizeModeFast;
options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
options.synchronous = YES;
WS(weakSelf);
[imageManager requestImageForAsset:currentPhoto
targetSize:CGSizeMake(ScreenWidth, ScreenHeight)
contentMode:PHImageContentModeAspectFit
options:options
resultHandler:^(UIImage *result, NSDictionary *info) {
[self.arrSelectedAssets addObject:currentPhoto];
[weakSelf.arrSelectedPhotos addObject:result];
[weakSelf.cache setObject:result forKey:currentPhoto];
}];
}else{
id result = [self.cache objectForKey:currentPhoto];
[self.arrSelectedAssets removeObject:currentPhoto];
[self.arrSelectedPhotos removeObject:result];
}
}
- (void)photoBrowserDidFinishModalPresentation:(MWPhotoBrowser *)photoBrowser {
if (self.arrSelectedAssets.count > 3) {
[XBLoadingView showHUDViewWithText:@"图片最多选择3张"];
return;
}
//
// PHImageManager *imageManager = [PHImageManager defaultManager];
// PHImageRequestOptions *options = [PHImageRequestOptions new];
// options.networkAccessAllowed = YES;
// options.resizeMode = PHImageRequestOptionsResizeModeFast;
// options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
// options.synchronous = YES;
// WS(weakSelf);
// [self.arrSelectedPhotos removeAllObjects];
// for (PHAsset *asset in self.arrSelectedAssets) {
// [imageManager requestImageForAsset:asset
// targetSize:CGSizeMake(ScreenWidth, ScreenHeight)
// contentMode:PHImageContentModeAspectFit
// options:options
// resultHandler:^(UIImage *result, NSDictionary *info) {
// [weakSelf.arrSelectedPhotos addObject:result];
// }];
// }
if (self.blockFinishSelected) {
self.blockFinishSelected();
}
[photoBrowser dismissViewControllerAnimated:YES
completion:nil];
}
- (void)selectAlbumImage {
if (![BaseViewController determinePhotosPermissions]) {
UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"提示" message:@"请在iPad的“设置-隐私-相册”选项中,允许欧立方访问你的相册" preferredStyle:UIAlertControllerStyleAlert];
[alertVC addAction:[UIAlertAction actionWithTitle:@"知道了" style:UIAlertActionStyleCancel handler:nil]];
[self.viewController presentViewController:alertVC animated:YES completion:nil];
return;
}
MWPhotoBrowser *browser = [[MWPhotoBrowser alloc] initWithDelegate:self];
browser.displayActionButton = YES;
browser.displayNavArrows = YES;
browser.displaySelectionButtons = YES;
browser.alwaysShowControls = YES;
browser.zoomPhotosToFill = YES;
browser.enableGrid = YES;
browser.startOnGrid = YES;
browser.enableSwipeToDismiss = YES;
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:browser];
[self.viewController.navigationController presentViewController:nav animated:YES completion:nil];
}
- (void)deletePhotoWithIndex:(NSInteger)index {
UIImage *image = self.arrSelectedPhotos[index];
//如果要删除的照片在缓存里面,那么这是相册选择的照片,需要从缓存删除
for (PHAsset *key in self.cache.allKeys) {
UIImage *cacheImage = [self.cache objectForKey:key];
if ([cacheImage isEqual:image]) {
[self.cache removeObjectForKey:key];
[self.arrSelectedAssets removeObject:key];
break;
}
}
[self.arrSelectedPhotos removeObject:image];
if (self.blockFinishSelected) {
self.blockFinishSelected();
}
}
/**
删除所有的图片
*/
- (void)deleteAll {
[self.arrSelectedAssets removeAllObjects];
[self.arrSelectedPhotos removeAllObjects];
[self.cache removeAllObjects];
if (self.blockFinishSelected) {
self.blockFinishSelected();
}
}
- (NSMutableArray *)mwPhotoArray {
if (!_mwPhotoArray) {
_mwPhotoArray = [NSMutableArray array];
_thumbsArray = [NSMutableArray array];
_allPhotoArray = [NSMutableArray array];
PHFetchOptions *options = [PHFetchOptions new];
options.sortDescriptors = @[ [NSSortDescriptor sortDescriptorWithKey:@"creationDate" ascending:NO] ];
PHFetchResult *fetchResults = [PHAsset fetchAssetsWithOptions:options];
UIScreen *screen = [UIScreen mainScreen];
CGFloat scale = screen.scale;
// Sizing is very rough... more thought required in a real implementation
CGFloat imageSize = MAX(screen.bounds.size.width, screen.bounds.size.height) * 1.5;
CGSize thumbTargetSize = CGSizeMake(imageSize / 3.0 * scale, imageSize / 3.0 * scale);
CGSize imageTargetSize = CGSizeMake(imageSize * scale, imageSize * scale);
[fetchResults enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
[_allPhotoArray addObject:obj];
[_mwPhotoArray addObject:[MWPhoto photoWithAsset:obj targetSize:imageTargetSize]];
[_thumbsArray addObject:[MWPhoto photoWithAsset:obj targetSize:thumbTargetSize]];
}];
}
return _mwPhotoArray;
}
- (NSMutableArray *)arrSelectedAssets {
if (!_arrSelectedAssets) {
_arrSelectedAssets = [NSMutableArray array];
}
return _arrSelectedAssets;
}
- (NSMutableArray *)arrSelectedPhotos {
if (!_arrSelectedPhotos) {
_arrSelectedPhotos = [NSMutableArray array];
}
return _arrSelectedPhotos;
}
- (NSDictionary *)cache {
if (!_cache) {
_cache = [NSMutableDictionary dictionary];
}
return _cache;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
......@@ -203,6 +203,7 @@
[weakSelf videoPlayFinish:studyList withIndexPath:indexPath];
}];
}];
[self presentViewController:pptVc animated:YES completion:nil];
}
}
......@@ -229,21 +230,11 @@
}];
}
#pragma mark - 学习完成,告诉服务器学习完成
- (void)httpStudyCompleteTaskId:(NSString *)taskId {
NSString *url = [NSString stringWithFormat:@"/study/finishStudy/%@/%@", taskId, [Shoppersmanager manager].shoppers.employee.fid];
[HTTP networkRequestWithURL:SERVERREQUESTURL(url) withRequestType:(GET) withParameter:nil withReturnValueBlock:^(id returnValue) {
NSLog(@"%@", returnValue);
} withFailureBlock:^(NSError *error) {
}];
}
#pragma mark - 视频播放完成
- (void)videoPlayFinish:(CustomStudyEntity *)studyEntity withIndexPath:(NSIndexPath *)indexPath
{
[self httpStudyCompleteTaskId:studyEntity.fid];
WS(weakSelf);
[self studyFinishGetIntegral:^(NSString *integral) {
LearningCompleteViewController *assessmentVc = [[[weakSelf class] getLearningCenterStoryboardClass] instantiateViewControllerWithIdentifier:@"LearningCompleteViewController"];
......
......@@ -335,6 +335,11 @@
29F726011CE1D05D0072FE0E /* ScreeningCollectionReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F726001CE1D05D0072FE0E /* ScreeningCollectionReusableView.m */; };
29F726041CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F726031CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m */; };
458754197D16754238F76D64 /* libPods-Lighting.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 776B804E9EBF4148093B44DF /* libPods-Lighting.a */; };
8F0FD1A11EA48EC500D38035 /* ForumDetailBottomView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F0FD1A01EA48EC500D38035 /* ForumDetailBottomView.m */; };
8F0FD1A41EA494EA00D38035 /* ForumDetailBottomPictureCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F0FD1A31EA494EA00D38035 /* ForumDetailBottomPictureCell.m */; };
8F0FD1A71EA4A8BF00D38035 /* ZJKeyBoardAccessoryView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F0FD1A61EA4A8BF00D38035 /* ZJKeyBoardAccessoryView.m */; };
8F7B45461EA61FED00E52092 /* ForumCommentListViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F7B45451EA61FED00E52092 /* ForumCommentListViewModel.m */; };
8FEF03F31EA7543F00837A64 /* UIImage+Helper.m in Sources */ = {isa = PBXBuildFile; fileRef = 8FEF03F21EA7543F00837A64 /* UIImage+Helper.m */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
......@@ -976,6 +981,16 @@
29F726031CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScreeningSecondCollectionReusableView.m; sourceTree = "<group>"; };
76F03CC259F648C692EA812D /* Pods-Lighting.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Lighting.release.xcconfig"; path = "Pods/Target Support Files/Pods-Lighting/Pods-Lighting.release.xcconfig"; sourceTree = "<group>"; };
776B804E9EBF4148093B44DF /* libPods-Lighting.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Lighting.a"; sourceTree = BUILT_PRODUCTS_DIR; };
8F0FD19F1EA48EC500D38035 /* ForumDetailBottomView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ForumDetailBottomView.h; sourceTree = "<group>"; };
8F0FD1A01EA48EC500D38035 /* ForumDetailBottomView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ForumDetailBottomView.m; sourceTree = "<group>"; };
8F0FD1A21EA494EA00D38035 /* ForumDetailBottomPictureCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ForumDetailBottomPictureCell.h; sourceTree = "<group>"; };
8F0FD1A31EA494EA00D38035 /* ForumDetailBottomPictureCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ForumDetailBottomPictureCell.m; sourceTree = "<group>"; };
8F0FD1A51EA4A8BF00D38035 /* ZJKeyBoardAccessoryView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZJKeyBoardAccessoryView.h; sourceTree = "<group>"; };
8F0FD1A61EA4A8BF00D38035 /* ZJKeyBoardAccessoryView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZJKeyBoardAccessoryView.m; sourceTree = "<group>"; };
8F7B45441EA61FED00E52092 /* ForumCommentListViewModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ForumCommentListViewModel.h; sourceTree = "<group>"; };
8F7B45451EA61FED00E52092 /* ForumCommentListViewModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ForumCommentListViewModel.m; sourceTree = "<group>"; };
8FEF03F11EA7543F00837A64 /* UIImage+Helper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+Helper.h"; sourceTree = "<group>"; };
8FEF03F21EA7543F00837A64 /* UIImage+Helper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+Helper.m"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
......@@ -1768,6 +1783,8 @@
2901738A1E0A22940005F48B /* UIButton+countDown.m */,
298111101DFE674600F7EAFF /* UIImage+Fit.h */,
298111111DFE674600F7EAFF /* UIImage+Fit.m */,
8FEF03F11EA7543F00837A64 /* UIImage+Helper.h */,
8FEF03F21EA7543F00837A64 /* UIImage+Helper.m */,
2962D07F1CD1E6010058829D /* UIView+Frame.h */,
2962D0801CD1E6010058829D /* UIView+Frame.m */,
2916A7461D703A1700644C8C /* UIView+cornerRadius.h */,
......@@ -2160,6 +2177,8 @@
29ACDAE51DF9696E003A0634 /* CustomImageBackView.m */,
29B78C101DFA8BD500C7C6D8 /* KeyBoardAccessoryView.h */,
29B78C111DFA8BD500C7C6D8 /* KeyBoardAccessoryView.m */,
8F0FD1A51EA4A8BF00D38035 /* ZJKeyBoardAccessoryView.h */,
8F0FD1A61EA4A8BF00D38035 /* ZJKeyBoardAccessoryView.m */,
291D11971E790DFA001E081E /* CalibrationCollectionViewCell.h */,
291D11981E790DFA001E081E /* CalibrationCollectionViewCell.m */,
291D119A1E790E16001E081E /* CalibrationDetailCollectionCell.h */,
......@@ -2170,6 +2189,10 @@
291D11A11E7923FF001E081E /* TriangleIndicatorView.m */,
299E45C51E8D2C860071A4CF /* ForumDetailPhotoTableViewCell.h */,
299E45C61E8D2C860071A4CF /* ForumDetailPhotoTableViewCell.m */,
8F0FD19F1EA48EC500D38035 /* ForumDetailBottomView.h */,
8F0FD1A01EA48EC500D38035 /* ForumDetailBottomView.m */,
8F0FD1A21EA494EA00D38035 /* ForumDetailBottomPictureCell.h */,
8F0FD1A31EA494EA00D38035 /* ForumDetailBottomPictureCell.m */,
);
path = Views;
sourceTree = "<group>";
......@@ -2296,6 +2319,7 @@
29C30BD71DDC1E8C00CA3E29 /* ComprehensiveDiscussion */ = {
isa = PBXGroup;
children = (
8F7B45431EA61FB700E52092 /* ViewModels */,
2999B1301DE6CD760031F79E /* Cells */,
2999B12C1DE6CD4F0031F79E /* Controllers */,
298111171DFE9F2C00F7EAFF /* Models */,
......@@ -2870,6 +2894,15 @@
name = Pods;
sourceTree = "<group>";
};
8F7B45431EA61FB700E52092 /* ViewModels */ = {
isa = PBXGroup;
children = (
8F7B45441EA61FED00E52092 /* ForumCommentListViewModel.h */,
8F7B45451EA61FED00E52092 /* ForumCommentListViewModel.m */,
);
path = ViewModels;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
......@@ -3080,6 +3113,7 @@
files = (
293163FA1DCE3CBA0075129D /* LuckyDrawDetailsViewController.m in Sources */,
29CC51ED1E8A011E009FBB6A /* RebateDetailsViewController.m in Sources */,
8F7B45461EA61FED00E52092 /* ForumCommentListViewModel.m in Sources */,
29045F321DCA192700E42A86 /* PromptHeaderTableViewCell.m in Sources */,
2940AE9B1DE7FE17001164B0 /* OnlineLearningDetailViewController.m in Sources */,
2986B9A31DE1D30700F4A1CF /* PromotionChooseNavigationController.m in Sources */,
......@@ -3151,6 +3185,7 @@
29E384D11CE9C65700888199 /* SearchViewController.m in Sources */,
29AB91FF1E553C16003A3A08 /* AnnouncementListTableViewCell.m in Sources */,
2928F8421CD0ABAC0036D761 /* ShoppingViewController.m in Sources */,
8F0FD1A71EA4A8BF00D38035 /* ZJKeyBoardAccessoryView.m in Sources */,
29AB920C1E5542CD003A3A08 /* MessageTableViewCell.m in Sources */,
29698D611CE2C11500D72CE7 /* SettlementViewController.m in Sources */,
29498C5D1D053B2C004FA79B /* ShoppingBagViewController.m in Sources */,
......@@ -3200,6 +3235,7 @@
291D118D1E790B0B001E081E /* DiscussMainViewController.m in Sources */,
2942F8A61CDD80C2005B377E /* authenticateView.m in Sources */,
29ACDAE31DF966EF003A0634 /* ForumItemListViewController.m in Sources */,
8F0FD1A11EA48EC500D38035 /* ForumDetailBottomView.m in Sources */,
2940AE861DE7FCDB001164B0 /* VideoListViewController.m in Sources */,
291D6A581CFFD45F007891AE /* SceneSectionHeaderView.m in Sources */,
29CC51F51E8A011E009FBB6A /* BindingSuccessViewController.m in Sources */,
......@@ -3275,6 +3311,7 @@
295DEAA71DB756DA006ED4A6 /* CardCollectionViewCell.m in Sources */,
291D6A6B1D000A2A007891AE /* ProductScreeningCollectionViewCell.m in Sources */,
29CC51EC1E8A011E009FBB6A /* PaymentWithdrawalMainViewController.m in Sources */,
8F0FD1A41EA494EA00D38035 /* ForumDetailBottomPictureCell.m in Sources */,
297BA2C81DE94D3300474F79 /* VIMediaDownloader.m in Sources */,
299876421CD99E4000C90D0A /* OrderdetailsViewController.m in Sources */,
29EC331A1CE023D5005F0C13 /* ChangePasswordViewController.m in Sources */,
......@@ -3359,6 +3396,7 @@
29834EC01CDF5E4E001A484F /* ScreeningFirstCollectionViewCell.m in Sources */,
29834EC51CDF76C1001A484F /* UserViewController.m in Sources */,
29E2D3271DB88D8B00443170 /* CardOrderInformationReusableView.m in Sources */,
8FEF03F31EA7543F00837A64 /* UIImage+Helper.m in Sources */,
2971E9841DF69F9A00256567 /* CountDownLabel.m in Sources */,
29CC51F81E8A032D009FBB6A /* LuckyDrawMainViewController.m in Sources */,
2962D06D1CD1A43A0058829D /* ClientViewController.m in Sources */,
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16E195" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12118" systemVersion="16E195" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<device id="ipad9_7" orientation="landscape">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
......@@ -359,7 +359,7 @@
<rect key="frame" x="0.0" y="28" width="1024" height="90"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ctQ-16-eCQ" id="DuY-Eq-G4z">
<rect key="frame" x="0.0" y="0.0" width="830" height="89"/>
<rect key="frame" x="0.0" y="0.0" width="830" height="89.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="00登录-谭" translatesAutoresizingMaskIntoConstraints="NO" id="jVJ-Bu-xw9">
......@@ -1065,7 +1065,7 @@
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="AssessmentHeaderView" id="UfB-K3-NdF" customClass="AssessmentHeaderView">
<rect key="frame" x="0.0" y="56" width="460" height="44"/>
<rect key="frame" x="0.0" y="55.5" width="460" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="UfB-K3-NdF" id="WGo-Wa-YTq">
<rect key="frame" x="0.0" y="0.0" width="460" height="44"/>
......@@ -1091,7 +1091,7 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="AssessmentTableViewCell" rowHeight="52" id="gIe-bF-XsX" customClass="AssessmentTableViewCell">
<rect key="frame" x="0.0" y="100" width="460" height="52"/>
<rect key="frame" x="0.0" y="99.5" width="460" height="52"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="gIe-bF-XsX" id="Va8-wn-DBM">
<rect key="frame" x="0.0" y="0.0" width="460" height="52"/>
......@@ -1137,7 +1137,7 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="AssessmentShortAnswerTableViewCell" rowHeight="112" id="smV-qr-KgP" customClass="AssessmentShortAnswerTableViewCell">
<rect key="frame" x="0.0" y="152" width="460" height="112"/>
<rect key="frame" x="0.0" y="151.5" width="460" height="112"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="smV-qr-KgP" id="A2f-ek-60T">
<rect key="frame" x="0.0" y="0.0" width="460" height="112"/>
......@@ -1373,7 +1373,7 @@
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="CalibrationDetailCollectionCell" id="dGo-4o-u9g" customClass="CalibrationDetailCollectionCell">
<rect key="frame" x="0.0" y="10" width="93" height="41"/>
<rect key="frame" x="0.0" y="9.5" width="93" height="41"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="93" height="41"/>
......@@ -1453,7 +1453,7 @@
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="CalibrationCollectionViewCell" id="v20-Kz-8OX" customClass="CalibrationCollectionViewCell">
<rect key="frame" x="0.0" y="5" width="50" height="50"/>
<rect key="frame" x="0.0" y="4.5" width="50" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
......@@ -2157,7 +2157,7 @@
<rect key="frame" x="0.0" y="28" width="1024" height="100"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Qnm-0r-wEL" id="VAA-bT-OlF">
<rect key="frame" x="0.0" y="0.0" width="1024" height="99"/>
<rect key="frame" x="0.0" y="0.0" width="1024" height="99.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="课时简介" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="agZ-rF-DnB">
......@@ -2189,7 +2189,7 @@
<rect key="frame" x="0.0" y="128" width="1024" height="130"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="WzB-nZ-wsW" id="Zzv-Yi-ZxT">
<rect key="frame" x="0.0" y="0.0" width="1024" height="129"/>
<rect key="frame" x="0.0" y="0.0" width="1024" height="129.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="授课讲师" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kxK-dX-OAf">
......@@ -2246,7 +2246,7 @@
<rect key="frame" x="0.0" y="258" width="1024" height="100"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="oia-jO-L9n" id="AMF-ag-ZWN">
<rect key="frame" x="0.0" y="0.0" width="1024" height="99"/>
<rect key="frame" x="0.0" y="0.0" width="1024" height="99.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="针对人员" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NfI-IM-h1i">
......@@ -2518,12 +2518,12 @@
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kEq-ur-qoX">
<rect key="frame" x="330" y="10" width="70" height="30"/>
<rect key="frame" x="310" y="12" width="90" height="26"/>
<constraints>
<constraint firstAttribute="width" constant="70" id="AyV-pl-VGJ"/>
<constraint firstAttribute="height" constant="30" id="oBJ-gK-mHg"/>
<constraint firstAttribute="width" constant="90" id="AyV-pl-VGJ"/>
<constraint firstAttribute="height" constant="26" id="oBJ-gK-mHg"/>
</constraints>
<state key="normal" title="开始答题"/>
<state key="normal" backgroundImage="startEvaluation"/>
<connections>
<action selector="actionStartAnswer:" destination="YXo-b3-NKo" eventType="touchUpInside" id="Bgd-Lu-ItT"/>
</connections>
......@@ -2586,7 +2586,7 @@
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="通过" translatesAutoresizingMaskIntoConstraints="NO" id="Gwb-yp-kzF">
<rect key="frame" x="357" y="15" width="50" height="20"/>
<rect key="frame" x="350" y="15" width="50" height="20"/>
<constraints>
<constraint firstAttribute="width" constant="50" id="3pT-7N-uob"/>
<constraint firstAttribute="height" constant="20" id="sFf-Ng-aIU"/>
......@@ -2600,12 +2600,12 @@
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cSM-mJ-Ih8">
<rect key="frame" x="337" y="10" width="70" height="30"/>
<rect key="frame" x="310" y="12.5" width="90" height="26"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="AhY-XM-AIa"/>
<constraint firstAttribute="width" constant="70" id="dZU-Xt-mQu"/>
<constraint firstAttribute="height" constant="26" id="AhY-XM-AIa"/>
<constraint firstAttribute="width" constant="90" id="dZU-Xt-mQu"/>
</constraints>
<state key="normal" title="开始答题"/>
<state key="normal" backgroundImage="startEvaluation"/>
<connections>
<action selector="actionStartAnswer:" destination="OSF-93-RuO" eventType="touchUpInside" id="GlH-hr-1xT"/>
</connections>
......@@ -2613,7 +2613,7 @@
</subviews>
<constraints>
<constraint firstItem="cSM-mJ-Ih8" firstAttribute="centerY" secondItem="IQr-pV-6ZO" secondAttribute="centerY" id="1Dw-hQ-AZN"/>
<constraint firstItem="t1Q-41-RAj" firstAttribute="leading" secondItem="cSM-mJ-Ih8" secondAttribute="trailing" constant="50" id="9bb-a8-pJP"/>
<constraint firstItem="t1Q-41-RAj" firstAttribute="leading" secondItem="cSM-mJ-Ih8" secondAttribute="trailing" constant="57" id="9bb-a8-pJP"/>
<constraint firstItem="Gwb-yp-kzF" firstAttribute="centerY" secondItem="t1Q-41-RAj" secondAttribute="centerY" id="Lvf-ms-adf"/>
<constraint firstItem="t1Q-41-RAj" firstAttribute="leading" secondItem="6O1-Dg-ELo" secondAttribute="trailing" constant="20" id="P2g-cX-AOe"/>
<constraint firstAttribute="bottom" secondItem="SCg-SR-kAg" secondAttribute="bottom" id="PQy-Zh-wy0"/>
......@@ -2621,7 +2621,7 @@
<constraint firstItem="6O1-Dg-ELo" firstAttribute="leading" secondItem="j7R-oP-wMP" secondAttribute="trailing" constant="22" id="bNv-py-RlR"/>
<constraint firstItem="j7R-oP-wMP" firstAttribute="leading" secondItem="IQr-pV-6ZO" secondAttribute="leading" constant="12" id="cjG-Ve-HKc"/>
<constraint firstItem="SCg-SR-kAg" firstAttribute="leading" secondItem="IQr-pV-6ZO" secondAttribute="leading" id="d7E-Z5-M32"/>
<constraint firstItem="t1Q-41-RAj" firstAttribute="leading" secondItem="Gwb-yp-kzF" secondAttribute="trailing" constant="50" id="gss-Qt-GwH"/>
<constraint firstItem="t1Q-41-RAj" firstAttribute="leading" secondItem="Gwb-yp-kzF" secondAttribute="trailing" constant="57" id="gss-Qt-GwH"/>
<constraint firstAttribute="trailing" secondItem="t1Q-41-RAj" secondAttribute="trailing" constant="15" id="hWI-F3-sQG"/>
<constraint firstItem="6O1-Dg-ELo" firstAttribute="centerY" secondItem="j7R-oP-wMP" secondAttribute="centerY" id="uNk-Xg-kfU"/>
<constraint firstAttribute="trailing" secondItem="SCg-SR-kAg" secondAttribute="trailing" id="udK-Hq-DUA"/>
......@@ -2747,7 +2747,7 @@
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="AssessmentHeaderView" rowHeight="60" id="2M5-To-MLj" customClass="AssessmentHeaderView">
<rect key="frame" x="0.0" y="56" width="1024" height="60"/>
<rect key="frame" x="0.0" y="55.5" width="1024" height="60"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="2M5-To-MLj" id="ypf-GL-4CP">
<rect key="frame" x="0.0" y="0.0" width="1024" height="60"/>
......@@ -2773,7 +2773,7 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="AssessmentTableViewCell" rowHeight="50" id="BjI-a1-CRm" customClass="AssessmentTableViewCell">
<rect key="frame" x="0.0" y="116" width="1024" height="50"/>
<rect key="frame" x="0.0" y="115.5" width="1024" height="50"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="BjI-a1-CRm" id="bq8-ly-DcD">
<rect key="frame" x="0.0" y="0.0" width="1024" height="50"/>
......@@ -3035,11 +3035,11 @@
<rect key="frame" x="0.0" y="0.0" width="1024" height="768"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="118" sectionHeaderHeight="1" sectionFooterHeight="1" translatesAutoresizingMaskIntoConstraints="NO" id="TVZ-eo-sh6">
<rect key="frame" x="0.0" y="44" width="1024" height="674"/>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="304" sectionHeaderHeight="1" sectionFooterHeight="1" translatesAutoresizingMaskIntoConstraints="NO" id="TVZ-eo-sh6">
<rect key="frame" x="0.0" y="44" width="1024" height="610"/>
<color key="backgroundColor" red="0.96078431372549022" green="0.97647058823529409" blue="0.98039215686274506" alpha="1" colorSpace="calibratedRGB"/>
<view key="tableHeaderView" contentMode="scaleToFill" id="sYW-Jc-Fde">
<rect key="frame" x="0.0" y="0.0" width="1024" height="70"/>
<rect key="frame" x="0.0" y="0.0" width="1024" height="6"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="00登录-谭" translatesAutoresizingMaskIntoConstraints="NO" id="v3R-bc-vx5">
......@@ -3111,15 +3111,15 @@
</constraints>
</view>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="CommentListTableViewCell" rowHeight="84" id="sX2-jy-tQ2" customClass="CommentListTableViewCell">
<rect key="frame" x="0.0" y="71" width="1024" height="84"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="CommentListTableViewCell" rowHeight="304" id="sX2-jy-tQ2" customClass="CommentListTableViewCell">
<rect key="frame" x="0.0" y="7" width="1024" height="304"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="sX2-jy-tQ2" id="iVT-bi-RKr">
<rect key="frame" x="0.0" y="0.0" width="1024" height="84"/>
<rect key="frame" x="0.0" y="0.0" width="1024" height="304"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="crown" translatesAutoresizingMaskIntoConstraints="NO" id="pyu-Y7-w8M">
<rect key="frame" x="282" y="12" width="60" height="60"/>
<rect key="frame" x="282" y="13" width="60" height="60"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="Gok-Ml-TgO"/>
<constraint firstAttribute="width" constant="60" id="hAp-sv-kym"/>
......@@ -3132,20 +3132,20 @@
<constraint firstAttribute="height" constant="35" id="ccw-v8-BsU"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mfw-jx-1kt">
<rect key="frame" x="68" y="20" width="0.0" height="0.0"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mfw-jx-1kt">
<rect key="frame" x="68" y="20" width="7" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Nam-PB-SZa">
<rect key="frame" x="68" y="55" width="0.0" height="0.0"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Nam-PB-SZa">
<rect key="frame" x="68" y="40" width="21" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8Th-tT-RVY">
<rect key="frame" x="20" y="60" width="984" height="14"/>
<rect key="frame" x="20" y="245" width="984" height="49"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
......@@ -3162,26 +3162,59 @@
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qn5-UZ-cM4">
<rect key="frame" x="0.0" y="83" width="1024" height="1"/>
<rect key="frame" x="0.0" y="303" width="1024" height="1"/>
<color key="backgroundColor" red="0.92941176470588238" green="0.93333333333333335" blue="0.93725490196078431" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="fAA-nf-dma"/>
</constraints>
</view>
<view tag="1111" contentMode="scaleAspectFill" translatesAutoresizingMaskIntoConstraints="NO" id="b31-hr-5yT">
<rect key="frame" x="20" y="73" width="400" height="164"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Od7-sI-lw9">
<rect key="frame" x="0.0" y="0.0" width="128" height="164"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="FpA-hd-kLS">
<rect key="frame" x="272" y="0.0" width="128" height="164"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" tag="1" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="BTw-Cs-JhN">
<rect key="frame" x="136" y="0.0" width="128" height="164"/>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="BTw-Cs-JhN" firstAttribute="top" secondItem="b31-hr-5yT" secondAttribute="top" id="1oR-kk-w8t"/>
<constraint firstItem="FpA-hd-kLS" firstAttribute="width" secondItem="Od7-sI-lw9" secondAttribute="width" id="4IH-iu-WUq"/>
<constraint firstAttribute="trailing" secondItem="FpA-hd-kLS" secondAttribute="trailing" id="5bH-St-jjw"/>
<constraint firstAttribute="height" constant="164" id="AbZ-nF-ahw"/>
<constraint firstAttribute="bottom" secondItem="Od7-sI-lw9" secondAttribute="bottom" id="EvK-Uh-Cfz"/>
<constraint firstAttribute="width" constant="400" id="IKp-jx-nxy"/>
<constraint firstItem="FpA-hd-kLS" firstAttribute="top" secondItem="b31-hr-5yT" secondAttribute="top" id="Ifz-pR-ezl"/>
<constraint firstItem="Od7-sI-lw9" firstAttribute="leading" secondItem="b31-hr-5yT" secondAttribute="leading" id="MuS-u0-Sig"/>
<constraint firstItem="BTw-Cs-JhN" firstAttribute="leading" secondItem="Od7-sI-lw9" secondAttribute="trailing" constant="8" id="Xc6-bk-Xjn"/>
<constraint firstItem="FpA-hd-kLS" firstAttribute="leading" secondItem="BTw-Cs-JhN" secondAttribute="trailing" constant="8" id="fKs-Gi-M79"/>
<constraint firstItem="BTw-Cs-JhN" firstAttribute="width" secondItem="Od7-sI-lw9" secondAttribute="width" id="nze-wp-Uwl"/>
<constraint firstAttribute="bottom" secondItem="BTw-Cs-JhN" secondAttribute="bottom" id="uJW-J9-6W2"/>
<constraint firstAttribute="bottom" secondItem="FpA-hd-kLS" secondAttribute="bottom" id="ySe-Dt-53L"/>
<constraint firstItem="Od7-sI-lw9" firstAttribute="top" secondItem="b31-hr-5yT" secondAttribute="top" id="zW2-1c-mAZ"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="pyu-Y7-w8M" firstAttribute="centerY" secondItem="iVT-bi-RKr" secondAttribute="centerY" id="0uV-p1-8pa"/>
<constraint firstAttribute="bottom" secondItem="qn5-UZ-cM4" secondAttribute="bottom" id="4pS-CA-0MD"/>
<constraint firstItem="8Th-tT-RVY" firstAttribute="leading" secondItem="iVT-bi-RKr" secondAttribute="leading" constant="20" id="52a-nf-bps"/>
<constraint firstItem="b31-hr-5yT" firstAttribute="top" secondItem="pyu-Y7-w8M" secondAttribute="bottom" id="9Lt-gM-InY"/>
<constraint firstItem="VAs-Wx-TQb" firstAttribute="leading" secondItem="iVT-bi-RKr" secondAttribute="leadingMargin" constant="20" id="A23-1U-p4J"/>
<constraint firstAttribute="bottom" secondItem="8Th-tT-RVY" secondAttribute="bottom" constant="10" id="GHM-g1-aWA"/>
<constraint firstItem="Nam-PB-SZa" firstAttribute="leading" secondItem="mfw-jx-1kt" secondAttribute="leading" id="LH1-AC-vh1"/>
<constraint firstItem="mfw-jx-1kt" firstAttribute="top" secondItem="VAs-Wx-TQb" secondAttribute="top" id="LZO-yf-dpe"/>
<constraint firstItem="8Th-tT-RVY" firstAttribute="top" secondItem="iVT-bi-RKr" secondAttribute="top" constant="60" id="OyM-WB-gzg"/>
<constraint firstItem="mfw-jx-1kt" firstAttribute="leading" secondItem="VAs-Wx-TQb" secondAttribute="trailing" constant="5" id="TQh-0R-Fcz"/>
<constraint firstItem="qn5-UZ-cM4" firstAttribute="leading" secondItem="iVT-bi-RKr" secondAttribute="leading" id="Ttv-ma-62V"/>
<constraint firstItem="8Th-tT-RVY" firstAttribute="top" secondItem="b31-hr-5yT" secondAttribute="bottom" constant="8" id="bak-X4-GJw"/>
<constraint firstItem="b31-hr-5yT" firstAttribute="leading" secondItem="iVT-bi-RKr" secondAttribute="leading" constant="20" id="gUS-uZ-YEu"/>
<constraint firstItem="G4o-Xy-Sd4" firstAttribute="centerY" secondItem="VAs-Wx-TQb" secondAttribute="centerY" id="iL8-0n-q90"/>
<constraint firstItem="pyu-Y7-w8M" firstAttribute="centerX" secondItem="iVT-bi-RKr" secondAttribute="centerX" constant="-200" id="ifw-ag-xtC"/>
<constraint firstItem="pyu-Y7-w8M" firstAttribute="top" secondItem="iVT-bi-RKr" secondAttribute="top" constant="13" id="l4v-Ll-rbG"/>
<constraint firstAttribute="trailing" secondItem="qn5-UZ-cM4" secondAttribute="trailing" id="ndM-Oc-58s"/>
<constraint firstAttribute="trailing" secondItem="G4o-Xy-Sd4" secondAttribute="trailing" constant="30" id="saS-eK-h2C"/>
<constraint firstItem="Nam-PB-SZa" firstAttribute="bottom" secondItem="VAs-Wx-TQb" secondAttribute="bottom" id="tv1-1o-GqD"/>
......@@ -3191,11 +3224,13 @@
</tableViewCellContentView>
<color key="backgroundColor" red="0.96078431372549022" green="0.97647058823529409" blue="0.98039215686274506" alpha="1" colorSpace="calibratedRGB"/>
<connections>
<outlet property="attachmentView" destination="b31-hr-5yT" id="Ym0-qE-uzs"/>
<outlet property="baseImageView" destination="pyu-Y7-w8M" id="jsY-0f-R3H"/>
<outlet property="commentContentLabel" destination="8Th-tT-RVY" id="B6S-2g-UqK"/>
<outlet property="issuerDateLabel" destination="Nam-PB-SZa" id="wFD-lN-pYN"/>
<outlet property="issuerImageView" destination="VAs-Wx-TQb" id="dDR-Ly-0E6"/>
<outlet property="issuerNameLabel" destination="mfw-jx-1kt" id="vI6-04-8eR"/>
<outlet property="layoutAttHeight" destination="AbZ-nF-ahw" id="yVD-tf-A4X"/>
<outlet property="optionButton" destination="G4o-Xy-Sd4" id="0mJ-n7-uud"/>
</connections>
</tableViewCell>
......@@ -3205,84 +3240,155 @@
<outlet property="delegate" destination="VmI-Ft-Fno" id="akQ-Rt-C43"/>
</connections>
</tableView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yrS-Rd-y6d">
<rect key="frame" x="0.0" y="718" width="1024" height="50"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="VVI-3L-WRk" customClass="ForumDetailBottomView">
<rect key="frame" x="0.0" y="654" width="1024" height="114"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yAy-gW-uWW">
<rect key="frame" x="30" y="5" width="894" height="40"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yrS-Rd-y6d">
<rect key="frame" x="0.0" y="64" width="1024" height="50"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="发表评论" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="1kQ-zq-QUc">
<rect key="frame" x="12" y="5" width="783" height="30"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yAy-gW-uWW">
<rect key="frame" x="30" y="5" width="894" height="40"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="发表评论" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="1kQ-zq-QUc">
<rect key="frame" x="12" y="5" width="783" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="KJP-Oc-QZ2"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" returnKeyType="send"/>
<connections>
<outlet property="delegate" destination="VmI-Ft-Fno" id="flh-Ah-DiF"/>
</connections>
</textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="已有2条评论" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JpS-Ui-lUS">
<rect key="frame" x="815" y="10" width="69" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="Bh6-tN-ekw"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstAttribute="height" constant="30" id="KJP-Oc-QZ2"/>
<constraint firstAttribute="trailing" secondItem="JpS-Ui-lUS" secondAttribute="trailing" constant="10" id="bVq-lZ-Iip"/>
<constraint firstAttribute="height" constant="40" id="dty-v3-hTq"/>
<constraint firstItem="JpS-Ui-lUS" firstAttribute="centerY" secondItem="yAy-gW-uWW" secondAttribute="centerY" id="k6x-T0-Hou"/>
<constraint firstItem="JpS-Ui-lUS" firstAttribute="leading" secondItem="1kQ-zq-QUc" secondAttribute="trailing" constant="20" id="mzj-zX-n9L"/>
<constraint firstItem="1kQ-zq-QUc" firstAttribute="centerY" secondItem="yAy-gW-uWW" secondAttribute="centerY" id="pq0-Bj-MAM"/>
<constraint firstItem="1kQ-zq-QUc" firstAttribute="leading" secondItem="yAy-gW-uWW" secondAttribute="leading" constant="12" id="ubp-EQ-glx"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" returnKeyType="send"/>
<connections>
<outlet property="delegate" destination="VmI-Ft-Fno" id="flh-Ah-DiF"/>
</connections>
</textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="已有2条评论" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JpS-Ui-lUS">
<rect key="frame" x="815" y="10" width="69" height="20"/>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hBK-cP-6nE">
<rect key="frame" x="954" y="10" width="30" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="Bh6-tN-ekw"/>
<constraint firstAttribute="width" constant="30" id="NxS-I1-2qD"/>
<constraint firstAttribute="height" constant="30" id="ajY-I2-Qjn"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<state key="normal" backgroundImage="praise"/>
<state key="selected" backgroundImage="praised"/>
<connections>
<action selector="praiseButtonClickAction:" destination="VmI-Ft-Fno" eventType="touchUpInside" id="dUj-uu-O5t"/>
</connections>
</button>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3Aj-de-1WD">
<rect key="frame" x="0.0" y="0.0" width="1024" height="1"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.92941176470588238" green="0.93333333333333335" blue="0.93725490196078431" alpha="1" colorSpace="calibratedRGB"/>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="JpS-Ui-lUS" secondAttribute="trailing" constant="10" id="bVq-lZ-Iip"/>
<constraint firstAttribute="height" constant="40" id="dty-v3-hTq"/>
<constraint firstItem="JpS-Ui-lUS" firstAttribute="centerY" secondItem="yAy-gW-uWW" secondAttribute="centerY" id="k6x-T0-Hou"/>
<constraint firstItem="JpS-Ui-lUS" firstAttribute="leading" secondItem="1kQ-zq-QUc" secondAttribute="trailing" constant="20" id="mzj-zX-n9L"/>
<constraint firstItem="1kQ-zq-QUc" firstAttribute="centerY" secondItem="yAy-gW-uWW" secondAttribute="centerY" id="pq0-Bj-MAM"/>
<constraint firstItem="1kQ-zq-QUc" firstAttribute="leading" secondItem="yAy-gW-uWW" secondAttribute="leading" constant="12" id="ubp-EQ-glx"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hBK-cP-6nE">
<rect key="frame" x="954" y="10" width="30" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="30" id="NxS-I1-2qD"/>
<constraint firstAttribute="height" constant="30" id="ajY-I2-Qjn"/>
<constraint firstItem="hBK-cP-6nE" firstAttribute="centerY" secondItem="yrS-Rd-y6d" secondAttribute="centerY" id="Bga-dJ-3M8"/>
<constraint firstItem="hBK-cP-6nE" firstAttribute="leading" secondItem="yAy-gW-uWW" secondAttribute="trailing" constant="30" id="Euk-I2-3uk"/>
<constraint firstAttribute="trailing" secondItem="hBK-cP-6nE" secondAttribute="trailing" constant="40" id="OTT-8h-nBv"/>
<constraint firstItem="yAy-gW-uWW" firstAttribute="centerY" secondItem="hBK-cP-6nE" secondAttribute="centerY" id="bVB-Eo-o1W"/>
<constraint firstItem="yAy-gW-uWW" firstAttribute="leading" secondItem="yrS-Rd-y6d" secondAttribute="leading" constant="30" id="qrb-hT-6jN"/>
<constraint firstAttribute="height" constant="50" id="zF6-Rn-nHd"/>
</constraints>
<state key="normal" backgroundImage="praise"/>
<state key="selected" backgroundImage="praised"/>
<connections>
<action selector="praiseButtonClickAction:" destination="VmI-Ft-Fno" eventType="touchUpInside" id="dUj-uu-O5t"/>
</connections>
</button>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3Aj-de-1WD">
<rect key="frame" x="0.0" y="0.0" width="1024" height="1"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.92941176470588238" green="0.93333333333333335" blue="0.93725490196078431" alpha="1" colorSpace="calibratedRGB"/>
</view>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="aA9-3s-jqC">
<rect key="frame" x="0.0" y="0.0" width="1024" height="64"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="inV-cH-QhI">
<size key="itemSize" width="71" height="65"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="ForumDetailBottomPictureCell" id="9bN-6m-mlo" customClass="ForumDetailBottomPictureCell">
<rect key="frame" x="0.0" y="0.0" width="71" height="65"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="71" height="65"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="StudyGuides" translatesAutoresizingMaskIntoConstraints="NO" id="w3s-83-cgV">
<rect key="frame" x="8" y="8" width="55" height="49"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="J04-qa-jL1">
<rect key="frame" x="54" y="1" width="16" height="16"/>
<constraints>
<constraint firstAttribute="height" constant="16" id="0zb-kX-HKh"/>
<constraint firstAttribute="width" constant="16" id="LGw-yz-E7y"/>
</constraints>
<state key="normal" image="img_delete_icon"/>
<connections>
<action selector="actionDelete:" destination="9bN-6m-mlo" eventType="touchUpInside" id="BSU-EN-Zr7"/>
</connections>
</button>
</subviews>
</view>
<constraints>
<constraint firstAttribute="bottom" secondItem="w3s-83-cgV" secondAttribute="bottom" constant="8" id="0JU-Qz-P5e"/>
<constraint firstAttribute="trailing" secondItem="w3s-83-cgV" secondAttribute="trailing" constant="8" id="34K-eZ-JWk"/>
<constraint firstItem="J04-qa-jL1" firstAttribute="leading" secondItem="w3s-83-cgV" secondAttribute="trailing" constant="-9" id="L2y-AS-pCN"/>
<constraint firstItem="w3s-83-cgV" firstAttribute="top" secondItem="9bN-6m-mlo" secondAttribute="top" constant="8" id="kZQ-fv-lbn"/>
<constraint firstItem="w3s-83-cgV" firstAttribute="leading" secondItem="9bN-6m-mlo" secondAttribute="leading" constant="8" id="oz8-IF-H5O"/>
<constraint firstItem="w3s-83-cgV" firstAttribute="top" secondItem="J04-qa-jL1" secondAttribute="bottom" constant="-9" id="tDE-3x-PYB"/>
</constraints>
<connections>
<outlet property="imageView" destination="w3s-83-cgV" id="qgl-CS-IoV"/>
</connections>
</collectionViewCell>
</cells>
</collectionView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="hBK-cP-6nE" firstAttribute="centerY" secondItem="yrS-Rd-y6d" secondAttribute="centerY" id="Bga-dJ-3M8"/>
<constraint firstItem="hBK-cP-6nE" firstAttribute="leading" secondItem="yAy-gW-uWW" secondAttribute="trailing" constant="30" id="Euk-I2-3uk"/>
<constraint firstAttribute="trailing" secondItem="hBK-cP-6nE" secondAttribute="trailing" constant="40" id="OTT-8h-nBv"/>
<constraint firstItem="yAy-gW-uWW" firstAttribute="centerY" secondItem="hBK-cP-6nE" secondAttribute="centerY" id="bVB-Eo-o1W"/>
<constraint firstItem="yAy-gW-uWW" firstAttribute="leading" secondItem="yrS-Rd-y6d" secondAttribute="leading" constant="30" id="qrb-hT-6jN"/>
<constraint firstAttribute="height" constant="50" id="zF6-Rn-nHd"/>
<constraint firstItem="yrS-Rd-y6d" firstAttribute="leading" secondItem="VVI-3L-WRk" secondAttribute="leading" id="4xB-Ow-yNR"/>
<constraint firstAttribute="bottom" secondItem="yrS-Rd-y6d" secondAttribute="bottom" id="587-FP-JCM"/>
<constraint firstItem="yrS-Rd-y6d" firstAttribute="leading" secondItem="VVI-3L-WRk" secondAttribute="leading" id="7xJ-jJ-TC6"/>
<constraint firstItem="aA9-3s-jqC" firstAttribute="leading" secondItem="VVI-3L-WRk" secondAttribute="leading" id="Nrg-kz-MFP"/>
<constraint firstAttribute="trailing" secondItem="yrS-Rd-y6d" secondAttribute="trailing" id="ZEK-Ox-XKk"/>
<constraint firstAttribute="height" constant="114" id="iEu-K9-MY2"/>
<constraint firstItem="aA9-3s-jqC" firstAttribute="top" secondItem="VVI-3L-WRk" secondAttribute="top" id="kFY-33-FZf"/>
<constraint firstAttribute="trailing" secondItem="yrS-Rd-y6d" secondAttribute="trailing" id="mIs-4N-005"/>
<constraint firstItem="yrS-Rd-y6d" firstAttribute="top" secondItem="aA9-3s-jqC" secondAttribute="bottom" id="xnj-9V-b5X"/>
<constraint firstAttribute="trailing" secondItem="aA9-3s-jqC" secondAttribute="trailing" id="yrj-6w-zA2"/>
</constraints>
<connections>
<outlet property="collectionView" destination="aA9-3s-jqC" id="Vc0-wS-4Cb"/>
<outlet property="layout" destination="inV-cH-QhI" id="NUO-tb-bhG"/>
<outlet property="layoutHeight" destination="iEu-K9-MY2" id="o8C-RA-YeR"/>
</connections>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="yrS-Rd-y6d" firstAttribute="top" secondItem="TVZ-eo-sh6" secondAttribute="bottom" id="5Dc-OI-doq"/>
<constraint firstItem="TVZ-eo-sh6" firstAttribute="leading" secondItem="ZYe-68-bYv" secondAttribute="leading" id="9Cs-lr-jQQ"/>
<constraint firstItem="yrS-Rd-y6d" firstAttribute="leading" secondItem="ZYe-68-bYv" secondAttribute="leading" id="bai-Pj-qJx"/>
<constraint firstItem="TVZ-eo-sh6" firstAttribute="top" secondItem="JLf-JW-rUI" secondAttribute="bottom" constant="24" id="ja1-TM-3b0"/>
<constraint firstItem="VVI-3L-WRk" firstAttribute="leading" secondItem="ZYe-68-bYv" secondAttribute="leading" id="jxR-ol-Mmx"/>
<constraint firstAttribute="trailing" secondItem="VVI-3L-WRk" secondAttribute="trailing" id="kab-xP-SWN"/>
<constraint firstAttribute="trailing" secondItem="TVZ-eo-sh6" secondAttribute="trailing" id="qhZ-mN-cx4"/>
<constraint firstAttribute="trailing" secondItem="yrS-Rd-y6d" secondAttribute="trailing" id="uar-Ul-MWe"/>
<constraint firstItem="f5L-3o-b9m" firstAttribute="top" secondItem="yrS-Rd-y6d" secondAttribute="bottom" id="xZR-7p-WXg"/>
<constraint firstItem="f5L-3o-b9m" firstAttribute="top" secondItem="VVI-3L-WRk" secondAttribute="bottom" id="rkf-Kc-Ls8"/>
<constraint firstItem="VVI-3L-WRk" firstAttribute="top" secondItem="TVZ-eo-sh6" secondAttribute="bottom" id="s33-kb-45M"/>
</constraints>
</view>
<connections>
<outlet property="bottomView" destination="VVI-3L-WRk" id="40c-u2-u6e"/>
<outlet property="commentInputTextFieldView" destination="1kQ-zq-QUc" id="h8H-Mj-usv"/>
<outlet property="commentNumberLabel" destination="JpS-Ui-lUS" id="M67-9M-cQf"/>
<outlet property="commentView" destination="yAy-gW-uWW" id="MJ4-Po-HFM"/>
......@@ -3375,6 +3481,7 @@
<image name="Imagebackground" width="65" height="65"/>
<image name="Recruitbackground" width="2048" height="1402"/>
<image name="Recruitbackground_title" width="1762" height="939"/>
<image name="StudyGuides" width="229" height="318"/>
<image name="amplification" width="24" height="24"/>
<image name="back" width="10" height="16"/>
<image name="back5second" width="23" height="24"/>
......@@ -3389,6 +3496,7 @@
<image name="editor" width="1130" height="885"/>
<image name="extension" width="29" height="21"/>
<image name="finish-1" width="559" height="398"/>
<image name="img_delete_icon" width="28" height="28"/>
<image name="instructions" width="143" height="132"/>
<image name="learningbackground" width="2048" height="1536"/>
<image name="narrow" width="24" height="23"/>
......
{
"images" : [
{
"idiom" : "universal",
"filename" : "img_delete_icon.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "img_delete_icon@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "img_delete_icon@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
......@@ -15,7 +15,7 @@
<key>CFBundleName</key>
<string>欧立方</string>
<key>CFBundleShortVersionString</key>
<string>2.1.0</string>
<string>2.1.1</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
......@@ -48,7 +48,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string></string>
<string>2.1.1</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>wechat</string>
......
......@@ -99,6 +99,10 @@ typedef NS_ENUM(NSInteger,COMMENT_PRAISE) {
//#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://gomoredev:8082/opple-web/app%@",URL]
//外网http://debenson.picp.io/opple-web/
/**
* 局域网开发地址
*/
//#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://192.168.199.198:8080/opple-web/app%@",URL]
/**
* 服务器测试地址
......
//
// UIImage+Helper.h
// CXA
//
// Created by Xummer on 14-3-3.
// Copyright (c) 2014年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIImage (Helper)
+ (UIImage *)getThumbnailImage:(UIImage *)image withMaxLen:(CGFloat)maxLen;
- (UIImage *)thumbnailWithMaxLen:(CGFloat)maxLen;
- (UIImage *)imageWithTintColor:(UIColor *)tintColor;
- (UIImage *)imageWithGradientTintColor:(UIColor *)tintColor;
- (UIImage *)imageWithTintColor:(UIColor *)tintColor blendMode:(CGBlendMode)blendMode;
@end
@interface UIImage (Color)
+ (UIImage *)imageWithColor:(UIColor *)color;
+ (UIImage *)imageWithColor:(UIColor *)color andSize:(CGSize)size;
+ (UIImage *)imageWithColor:(UIColor *)color andRect:(CGRect)rect;
- (UIImage *)greyScaleImage;
/**
* 图片压缩到指定大小(具体看图片大小,过大的图片无法压缩到指定大小)
*
* @param kb 压缩后图片大小
*
* @return
*/
- (NSData *)scaledToSpaceMaxSize:(NSInteger)kb;
/**
* 压缩图片到指定高宽
*
* @param newSize 新的图片尺寸
*
* @return
*/
- (UIImage *)scaledToSize:(CGSize)newSize;
/**
* 按比例压缩图片至指定宽度
*
* @param newWidth 指定宽度
*
* @return
*/
- (UIImage *)scaledToWidth:(NSInteger)newWidth;
/**
* 获取图片缩略图
*
* @param sourceImage 原始图片
* @param size 生成尺寸
*
* @return 新的图片
*/
+ (UIImage *)imageCompressForSize:(UIImage *)sourceImage targetSize:(CGSize)size;
@end
//
// UIImage+Helper.m
// CXA
//
// Created by Xummer on 14-3-3.
// Copyright (c) 2014年 Xummer. All rights reserved.
//
#import "UIImage+Helper.h"
@implementation UIImage (Helper)
// if newImage's width or heigth < 1, image will be cliped
+ (UIImage *)getThumbnailImage:(UIImage *)image withMaxLen:(CGFloat)maxLen
{
CGFloat imageMaxLen, imageMinLen;
BOOL widthIsLarger = image.size.width > image.size.height;
if (widthIsLarger) {
imageMaxLen = image.size.width;
imageMinLen = image.size.height;
}
else {
imageMaxLen = image.size.height;
imageMinLen = image.size.width;
}
if (imageMaxLen > maxLen) {
CGFloat scaleFloat = maxLen/imageMaxLen;
CGFloat newImgMinL = imageMinLen * scaleFloat;
CGSize size;
if (newImgMinL < 1) {
scaleFloat = 1/imageMinLen;
if (widthIsLarger) {
size = CGSizeMake(maxLen, image.size.height * scaleFloat);
}
else {
size = CGSizeMake(image.size.width * scaleFloat, maxLen);
}
}
else {
size = CGSizeMake(image.size.width * scaleFloat,
image.size.height * scaleFloat);
}
UIGraphicsBeginImageContext(size);
CGContextRef context = UIGraphicsGetCurrentContext();
CGAffineTransform transform = CGAffineTransformIdentity;
transform = CGAffineTransformScale(transform, scaleFloat, scaleFloat);
CGContextConcatCTM(context, transform);
// Draw the image into the transformed context and return the image
[image drawAtPoint:CGPointMake(0.0f, 0.0f)];
UIImage *newimg = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return newimg;
}
else{
return image;
}
}
- (UIImage *)thumbnailWithMaxLen:(CGFloat)maxLen {
return [[self class] getThumbnailImage:self withMaxLen:maxLen];
}
- (UIImage *)imageWithTintColor:(UIColor *)tintColor {
return [self imageWithTintColor:tintColor blendMode:kCGBlendModeDestinationIn];
}
- (UIImage *)imageWithGradientTintColor:(UIColor *)tintColor {
return [self imageWithTintColor:tintColor blendMode:kCGBlendModeOverlay];
}
- (UIImage *)imageWithTintColor:(UIColor *)tintColor blendMode:(CGBlendMode)blendMode
{
//We want to keep alpha, set opaque to NO; Use 0.0f for scale to use the scale factor of the device’s main screen.
UIGraphicsBeginImageContextWithOptions(self.size, NO, 0.0f);
[tintColor setFill];
CGRect bounds = CGRectMake(0, 0, self.size.width, self.size.height);
UIRectFill(bounds);
//Draw the tinted image in context
[self drawInRect:bounds blendMode:blendMode alpha:1.0f];
if (blendMode != kCGBlendModeDestinationIn) {
[self drawInRect:bounds blendMode:kCGBlendModeDestinationIn alpha:1.0f];
}
UIImage *tintedImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return tintedImage;
}
@end
@implementation UIImage (Color)
typedef enum {
ALPHA = 0,
BLUE = 1,
GREEN = 2,
RED = 3
} PIXELS;
+ (UIImage *)imageWithColor:(UIColor *)color {
CGRect rect = CGRectMake(0.0f,0.0f,1.0f,1.0f);
return [[self class] imageWithColor:color andRect:rect];
}
+ (UIImage *)imageWithColor:(UIColor *)color andRect:(CGRect)rect {
UIGraphicsBeginImageContext(rect.size);
CGContextRef context =UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context,[color CGColor]);
CGContextFillRect(context, rect);
UIImage *image =UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}
+ (UIImage *)imageWithColor:(UIColor *)color andSize:(CGSize)size {
return [[self class] imageWithColor:color andRect:(CGRect){
.origin = CGPointZero,
.size = size
}];
}
- (UIImage *)greyScaleImage {
CGSize size = [self size];
int width = size.width;
int height = size.height;
// the pixels will be painted to this array
uint32_t *pixels = (uint32_t *) malloc(width * height * sizeof(uint32_t));
// clear the pixels so any transparency is preserved
memset(pixels, 0, width * height * sizeof(uint32_t));
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
// create a context with RGBA pixels
CGContextRef context = CGBitmapContextCreate(pixels, width, height, 8, width * sizeof(uint32_t), colorSpace,
kCGBitmapByteOrder32Little | kCGImageAlphaPremultipliedLast);
// paint the bitmap to our context which will fill in the pixels array
CGContextDrawImage(context, CGRectMake(0, 0, width, height), [self CGImage]);
for(int y = 0; y < height; y++) {
for(int x = 0; x < width; x++) {
uint8_t *rgbaPixel = (uint8_t *) &pixels[y * width + x];
// convert to grayscale using recommended method: http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale
uint32_t gray = 0.3 * rgbaPixel[RED] + 0.59 * rgbaPixel[GREEN] + 0.11 * rgbaPixel[BLUE];
// set the pixels to gray
rgbaPixel[RED] = gray;
rgbaPixel[GREEN] = gray;
rgbaPixel[BLUE] = gray;
}
}
// create a new CGImageRef from our context with the modified pixels
CGImageRef image = CGBitmapContextCreateImage(context);
// we're done with the context, color space, and pixels
CGContextRelease(context);
CGColorSpaceRelease(colorSpace);
free(pixels);
// make a new UIImage to return
UIImage *resultUIImage = [UIImage imageWithCGImage:image];
// we're done with image now too
CGImageRelease(image);
return resultUIImage;
}
- (NSData *)scaledToSpaceMaxSize:(NSInteger)kb {
//压缩到100kb以内
CGFloat compression = 0.5f;
CGFloat maxCompression = 0.1f;
NSUInteger maxlength = kb * 1024;
NSData *imgData = UIImageJPEGRepresentation(self, compression);
// CLog(@"处理之前的大小--->%lukB",(unsigned long)imgData.length/1024);
while ([imgData length] > maxlength && compression > maxCompression) {
compression -= 0.1;
imgData = UIImageJPEGRepresentation(self, compression);
}
// CLog(@"处理之后的大小--->%lukB",(unsigned long)imgData.length/1024);
return imgData;
}
- (UIImage *)scaledToSize:(CGSize)newSize {
UIGraphicsBeginImageContextWithOptions(newSize, YES, 0);
[self drawInRect:CGRectMake(0, 0, newSize.width, newSize.height)];
UIImage *scaledImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return scaledImage;
}
- (UIImage *)scaledToWidth:(NSInteger)newWidth {
CGSize newSize = CGSizeMake(newWidth, newWidth / self.size.width * self.size.height);
UIGraphicsBeginImageContextWithOptions(newSize, YES, 0);
[self drawInRect:CGRectMake(0, 0, newSize.width, newSize.height)];
UIImage *scaledImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return scaledImage;
}
#pragma mark - 获取缩略图
+ (UIImage *)imageCompressForSize:(UIImage *)sourceImage targetSize:(CGSize)size
{
UIImage *newImage = nil;
CGSize imageSize = sourceImage.size;
CGFloat width = imageSize.width;
CGFloat height = imageSize.height;
CGFloat targetWidth = size.width;
CGFloat targetHeight = size.height;
CGFloat scaleFactor = 0.0;
CGFloat scaledWidth = targetWidth;
CGFloat scaledHeight = targetHeight;
CGPoint thumbnailPoint = CGPointMake(0.0, 0.0);
if(CGSizeEqualToSize(imageSize, size) == NO){
CGFloat widthFactor = targetWidth / width;
CGFloat heightFactor = targetHeight / height;
if(widthFactor > heightFactor){
scaleFactor = widthFactor;
}
else{
scaleFactor = heightFactor;
}
scaledWidth = width * scaleFactor;
scaledHeight = height * scaleFactor;
if(widthFactor > heightFactor){
thumbnailPoint.y = (targetHeight - scaledHeight) * 0.5;
}else if(widthFactor < heightFactor){
thumbnailPoint.x = (targetWidth - scaledWidth) * 0.5;
}
}
UIGraphicsBeginImageContextWithOptions(size, NO, 3.0);
CGRect thumbnailRect = CGRectZero;
thumbnailRect.origin = thumbnailPoint;
thumbnailRect.size.width = scaledWidth;
thumbnailRect.size.height = scaledHeight;
[sourceImage drawInRect:thumbnailRect];
newImage = UIGraphicsGetImageFromCurrentImageContext();
if(newImage == nil){
NSLog(@"scale image fail");
}
UIGraphicsEndImageContext();
return newImage;
}
@end
......@@ -5757,8 +5757,6 @@ extern NSString * const GRADEMETHOD_MANUL;
*
*/
@property (nonatomic, copy) NSString *replyTime;
@property (nonatomic,copy) NSString *replyerPicture;
/**
* 方法: 取得回复内容
*
......@@ -5795,6 +5793,36 @@ extern NSString * const GRADEMETHOD_MANUL;
*
*/
@property (nonatomic, copy) NSString *replyerPosition;
/**
* (no documentation provided)
*
*
*/
@property (nonatomic, assign) NSInteger top;
/**
* (no documentation provided)
*
*
*/
@property (nonatomic, copy) NSString *attachmentId;
/**
* (no documentation provided)
* @see TOAttachmentEntity
*
*/
@property (nonatomic, strong) NSArray<TOAttachmentEntity> *attachments;
/**
* (no documentation provided)
*
*
*/
@property (nonatomic, copy) NSString *bestName;
/**
* 回复人头像
*
*
*/
@property (nonatomic, copy) NSString *replyerPicture;
@end /* interface TOForumReplyEntity */
......
......@@ -1996,6 +1996,11 @@ NSString * const GRADEMETHOD_MANUL = @"manul";
@synthesize replyerName;
@synthesize replyerRealName;
@synthesize replyerPosition;
@synthesize top;
@synthesize attachmentId;
@synthesize attachments;
@synthesize bestName;
@synthesize replyerPicture;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
......
......@@ -195,7 +195,7 @@
CGFloat distanceFromBottom = scrollView.contentSize.height - contentYoffset;
WS(weakSelf);
if (distanceFromBottom <= height && self.type == Study) {
[self httpStudyCompleteTaskId:self.studyId];
ShowDefaultAlertView(self, nil, @"学习完成,是否开始考核?", UIAlertControllerStyleAlert, ^{
if (weakSelf.scrollViewEndBottomBlock) {
weakSelf.scrollViewEndBottomBlock(weakSelf.indexPath);
......@@ -204,15 +204,6 @@
}
}
#pragma mark - 学习完成,告诉服务器学习完成
- (void)httpStudyCompleteTaskId:(NSString *)taskId {
NSString *url = [NSString stringWithFormat:@"/study/finishStudy/%@/%@", taskId, [Shoppersmanager manager].shoppers.employee.fid];
[HTTP networkRequestWithURL:SERVERREQUESTURL(url) withRequestType:(GET) withParameter:nil withReturnValueBlock:^(id returnValue) {
NSLog(@"%@", returnValue);
} withFailureBlock:^(NSError *error) {
}];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment