Commit 854bf594 cgx

我的动态UI搭建

1 个父辈 a76d867a
正在显示 46 个修改的文件 包含 732 行增加43 行删除
...@@ -300,6 +300,9 @@ ...@@ -300,6 +300,9 @@
D0FAC425281B817D00D4B859 /* GKPhotoBrowser.bundle in Resources */ = {isa = PBXBuildFile; fileRef = D0FAC41B281B817D00D4B859 /* GKPhotoBrowser.bundle */; }; D0FAC425281B817D00D4B859 /* GKPhotoBrowser.bundle in Resources */ = {isa = PBXBuildFile; fileRef = D0FAC41B281B817D00D4B859 /* GKPhotoBrowser.bundle */; };
D0FAC429281B865300D4B859 /* GKYYWebImageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D0FAC427281B865300D4B859 /* GKYYWebImageManager.m */; }; D0FAC429281B865300D4B859 /* GKYYWebImageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D0FAC427281B865300D4B859 /* GKYYWebImageManager.m */; };
D0FAC662281BAACB00D4B859 /* YYAnimationImageView+Fix.m in Sources */ = {isa = PBXBuildFile; fileRef = D0FAC661281BAACB00D4B859 /* YYAnimationImageView+Fix.m */; }; D0FAC662281BAACB00D4B859 /* YYAnimationImageView+Fix.m in Sources */ = {isa = PBXBuildFile; fileRef = D0FAC661281BAACB00D4B859 /* YYAnimationImageView+Fix.m */; };
D0FE45BC28FF80AA0020710A /* MyDynamicController.m in Sources */ = {isa = PBXBuildFile; fileRef = D0FE45BB28FF80AA0020710A /* MyDynamicController.m */; };
D0FE45BF28FF814C0020710A /* MyDynamicView.m in Sources */ = {isa = PBXBuildFile; fileRef = D0FE45BE28FF814C0020710A /* MyDynamicView.m */; };
D0FE45C528FF862F0020710A /* MyDynamicListResultModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D0FE45C428FF862F0020710A /* MyDynamicListResultModel.m */; };
D0FEE7D128854967006C2B67 /* SleepReadyDoneView.m in Sources */ = {isa = PBXBuildFile; fileRef = D0FEE7D028854967006C2B67 /* SleepReadyDoneView.m */; }; D0FEE7D128854967006C2B67 /* SleepReadyDoneView.m in Sources */ = {isa = PBXBuildFile; fileRef = D0FEE7D028854967006C2B67 /* SleepReadyDoneView.m */; };
D0FEE7D428855483006C2B67 /* SRFinishModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D0FEE7D328855483006C2B67 /* SRFinishModel.m */; }; D0FEE7D428855483006C2B67 /* SRFinishModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D0FEE7D328855483006C2B67 /* SRFinishModel.m */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
...@@ -885,6 +888,12 @@ ...@@ -885,6 +888,12 @@
D0FAC660281BAACB00D4B859 /* YYAnimationImageView+Fix.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "YYAnimationImageView+Fix.h"; sourceTree = "<group>"; }; D0FAC660281BAACB00D4B859 /* YYAnimationImageView+Fix.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "YYAnimationImageView+Fix.h"; sourceTree = "<group>"; };
D0FAC661281BAACB00D4B859 /* YYAnimationImageView+Fix.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "YYAnimationImageView+Fix.m"; sourceTree = "<group>"; }; D0FAC661281BAACB00D4B859 /* YYAnimationImageView+Fix.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "YYAnimationImageView+Fix.m"; sourceTree = "<group>"; };
D0FAC663281BB55C00D4B859 /* CGGeometry+RSKImageCropper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CGGeometry+RSKImageCropper.h"; sourceTree = "<group>"; }; D0FAC663281BB55C00D4B859 /* CGGeometry+RSKImageCropper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CGGeometry+RSKImageCropper.h"; sourceTree = "<group>"; };
D0FE45BA28FF80AA0020710A /* MyDynamicController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyDynamicController.h; sourceTree = "<group>"; };
D0FE45BB28FF80AA0020710A /* MyDynamicController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyDynamicController.m; sourceTree = "<group>"; };
D0FE45BD28FF814C0020710A /* MyDynamicView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyDynamicView.h; sourceTree = "<group>"; };
D0FE45BE28FF814C0020710A /* MyDynamicView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyDynamicView.m; sourceTree = "<group>"; };
D0FE45C328FF862F0020710A /* MyDynamicListResultModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyDynamicListResultModel.h; sourceTree = "<group>"; };
D0FE45C428FF862F0020710A /* MyDynamicListResultModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyDynamicListResultModel.m; sourceTree = "<group>"; };
D0FEE7CF28854967006C2B67 /* SleepReadyDoneView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SleepReadyDoneView.h; sourceTree = "<group>"; }; D0FEE7CF28854967006C2B67 /* SleepReadyDoneView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SleepReadyDoneView.h; sourceTree = "<group>"; };
D0FEE7D028854967006C2B67 /* SleepReadyDoneView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SleepReadyDoneView.m; sourceTree = "<group>"; }; D0FEE7D028854967006C2B67 /* SleepReadyDoneView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SleepReadyDoneView.m; sourceTree = "<group>"; };
D0FEE7D228855483006C2B67 /* SRFinishModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SRFinishModel.h; sourceTree = "<group>"; }; D0FEE7D228855483006C2B67 /* SRFinishModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SRFinishModel.h; sourceTree = "<group>"; };
...@@ -1584,6 +1593,12 @@ ...@@ -1584,6 +1593,12 @@
children = ( children = (
D06F2C4F28F6AEC50023921E /* PersonDynViewModel.h */, D06F2C4F28F6AEC50023921E /* PersonDynViewModel.h */,
D06F2C5028F6AEC50023921E /* PersonDynViewModel.m */, D06F2C5028F6AEC50023921E /* PersonDynViewModel.m */,
D0FE45BA28FF80AA0020710A /* MyDynamicController.h */,
D0FE45BB28FF80AA0020710A /* MyDynamicController.m */,
D0FE45BD28FF814C0020710A /* MyDynamicView.h */,
D0FE45BE28FF814C0020710A /* MyDynamicView.m */,
D0FE45C328FF862F0020710A /* MyDynamicListResultModel.h */,
D0FE45C428FF862F0020710A /* MyDynamicListResultModel.m */,
); );
path = PersonalDynamic; path = PersonalDynamic;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2698,6 +2713,7 @@ ...@@ -2698,6 +2713,7 @@
D0FAC420281B817D00D4B859 /* GKPhotoBrowserConfigure.m in Sources */, D0FAC420281B817D00D4B859 /* GKPhotoBrowserConfigure.m in Sources */,
D0B5ECD827F2F1B0003EDFE3 /* ServerAPIUtil.m in Sources */, D0B5ECD827F2F1B0003EDFE3 /* ServerAPIUtil.m in Sources */,
D0B5ECA627F2D9DE003EDFE3 /* AppDelegate.m in Sources */, D0B5ECA627F2D9DE003EDFE3 /* AppDelegate.m in Sources */,
D0FE45BF28FF814C0020710A /* MyDynamicView.m in Sources */,
D0FAC422281B817D00D4B859 /* GKPanGestureRecognizer.m in Sources */, D0FAC422281B817D00D4B859 /* GKPanGestureRecognizer.m in Sources */,
D07DACA82810557D0067A1BF /* RSKImageCropViewController.m in Sources */, D07DACA82810557D0067A1BF /* RSKImageCropViewController.m in Sources */,
D070A78328DEE5C20039C5A7 /* BindMobileController.m in Sources */, D070A78328DEE5C20039C5A7 /* BindMobileController.m in Sources */,
...@@ -2784,6 +2800,7 @@ ...@@ -2784,6 +2800,7 @@
D02E85882882A594002DAD7E /* PrepareItemsCell.m in Sources */, D02E85882882A594002DAD7E /* PrepareItemsCell.m in Sources */,
D0D69ED3282360F100A0D5EB /* LookAllController.m in Sources */, D0D69ED3282360F100A0D5EB /* LookAllController.m in Sources */,
D07A4B2D280EA73B00BA0EC0 /* UserInfoView.m in Sources */, D07A4B2D280EA73B00BA0EC0 /* UserInfoView.m in Sources */,
D0FE45BC28FF80AA0020710A /* MyDynamicController.m in Sources */,
D0878F48280BD18F005F1B7F /* LoginView.m in Sources */, D0878F48280BD18F005F1B7F /* LoginView.m in Sources */,
D0A75111282E3D0D00589B0E /* NoisePlayCell.m in Sources */, D0A75111282E3D0D00589B0E /* NoisePlayCell.m in Sources */,
D08EE4AC28F2CB1500B76FF9 /* ReplyDetailView.m in Sources */, D08EE4AC28F2CB1500B76FF9 /* ReplyDetailView.m in Sources */,
...@@ -2827,6 +2844,7 @@ ...@@ -2827,6 +2844,7 @@
D0D5BB0D286D7A8D00D0507E /* TaskGroupModel.m in Sources */, D0D5BB0D286D7A8D00D0507E /* TaskGroupModel.m in Sources */,
D0E3564028F55B50007190EE /* PraiseListController.m in Sources */, D0E3564028F55B50007190EE /* PraiseListController.m in Sources */,
D003140628FD449E00E01A6A /* MessageCenterViewModel.m in Sources */, D003140628FD449E00E01A6A /* MessageCenterViewModel.m in Sources */,
D0FE45C528FF862F0020710A /* MyDynamicListResultModel.m in Sources */,
D053D0DF28F40C6A00BB2B84 /* MessageController.m in Sources */, D053D0DF28F40C6A00BB2B84 /* MessageController.m in Sources */,
D043A8B6287EBA4000226176 /* ReadyItemView.m in Sources */, D043A8B6287EBA4000226176 /* ReadyItemView.m in Sources */,
D09BF331280E570D00E5F06C /* UserModel.m in Sources */, D09BF331280E570D00E5F06C /* UserModel.m in Sources */,
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
#import "ReportController.h" #import "ReportController.h"
#import "DynamicDetailController.h" #import "DynamicDetailController.h"
#import "PersonDynViewModel.h"
@interface CommunityController () <CommunityViewDelegate, DynamicControllerDelegate, DynamicDetailControllerDelegate> @interface CommunityController () <CommunityViewDelegate, DynamicControllerDelegate, DynamicDetailControllerDelegate>
@property (nonatomic, strong) CommunityView *communityView; @property (nonatomic, strong) CommunityView *communityView;
@property (nonatomic, assign) int offset; @property (nonatomic, assign) int offset;
...@@ -21,8 +19,6 @@ ...@@ -21,8 +19,6 @@
/// 存储动态id /// 存储动态id
@property (nonatomic, assign) int talkID; @property (nonatomic, assign) int talkID;
@property (nonatomic, strong) ComListViewModel *comListViewModel; @property (nonatomic, strong) ComListViewModel *comListViewModel;
@property (nonatomic, strong) PersonDynViewModel *personDynViewModel;
@end @end
@implementation CommunityController @implementation CommunityController
...@@ -61,22 +57,6 @@ ...@@ -61,22 +57,6 @@
[self.navigationController pushViewController:[MessageController new] animated:YES]; [self.navigationController pushViewController:[MessageController new] animated:YES];
} }
- (void)testDynDeleteAPI {
#warning - 测试删除接口
self.personDynViewModel = [PersonDynViewModel new];
self.personDynViewModel.oper_type = @"comment";
self.personDynViewModel.delete_id = 18;
[self.personDynViewModel communityDeleteOperationWithCompletion:^(PersonDynViewModel * _Nonnull requestModel) {
if (requestModel.resCode == DSResCodeSuccess) {
[self.comListViewModel deleteComDynWithDynamicID:self.personDynViewModel.delete_id];
[self.communityView updateListView];
} else {
[DSProgressHUD showToast:requestModel.errMessage];
}
}];
}
#pragma mark - CommunityViewDelegate #pragma mark - CommunityViewDelegate
- (void)tapCommunityHeaderModule:(NSInteger)index { - (void)tapCommunityHeaderModule:(NSInteger)index {
if (![LoginUtils getUserLoginData]) { if (![LoginUtils getUserLoginData]) {
......
...@@ -11,10 +11,11 @@ ...@@ -11,10 +11,11 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
/// 社区动态列表结果数据model
@interface ComDynListResultModel : NSObject @interface ComDynListResultModel : NSObject
/// 官方动态消息 /// 官方动态消息
@property (nonatomic, strong) OfficialMessageModel *officialMessageModel; @property (nonatomic, strong) OfficialMessageModel *officialMessageModel;
/// 总 /// 总动态
@property (nonatomic, assign) int count; @property (nonatomic, assign) int count;
/// 用户动态列表 /// 用户动态列表
@property (nonatomic, strong) NSArray<ComDynModel *> *data_list; @property (nonatomic, strong) NSArray<ComDynModel *> *data_list;
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
typedef NS_ENUM(int, DynModelType) { typedef NS_ENUM(int, DynModelType) {
DynModelTypeCom, // 社区动态cell DynModelTypeCom, // 社区动态cell
DynModelTypeDetail, // 社区动态详情cell DynModelTypeDetail, // 社区动态详情cell
DynModelTypeMyDyn, // 我的动态cell
}; };
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
...@@ -39,6 +40,11 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -39,6 +40,11 @@ NS_ASSUME_NONNULL_BEGIN
/// 社区动态cell内容(不展开)和社区详情cell内容(全部展开)展开标识 /// 社区动态cell内容(不展开)和社区详情cell内容(全部展开)展开标识
@property (nonatomic, assign) DynModelType modelType; @property (nonatomic, assign) DynModelType modelType;
/// 我的动态编辑状态
@property (nonatomic, assign) BOOL isEdited;
/// 我的动态选中状态
@property (nonatomic, assign) BOOL selected;
+ (UIFont *)contentFont; + (UIFont *)contentFont;
+ (CGFloat)contentMargin:(DynModelType)type; + (CGFloat)contentMargin:(DynModelType)type;
- (NSAttributedString *)contentAttriStr; - (NSAttributedString *)contentAttriStr;
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
} }
+ (CGFloat)contentMargin:(DynModelType)type { + (CGFloat)contentMargin:(DynModelType)type {
return type == DynModelTypeCom ? 15 : 30; return (type == DynModelTypeCom || type == DynModelTypeMyDyn) ? 15 : 30;
} }
- (NSAttributedString *)contentAttriStr { - (NSAttributedString *)contentAttriStr {
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
#pragma mark - private #pragma mark - private
- (CGFloat)contentMaxW { - (CGFloat)contentMaxW {
CGFloat marigin = [ComDynModel contentMargin:self.modelType]; CGFloat marigin = [ComDynModel contentMargin:self.modelType];
if (self.modelType == DynModelTypeCom) { if ((self.modelType == DynModelTypeCom || self.modelType == DynModelTypeMyDyn)) {
return kScreenWidth - 4 * marigin; return kScreenWidth - 4 * marigin;
} else if (self.modelType == DynModelTypeDetail) { } else if (self.modelType == DynModelTypeDetail) {
return kScreenWidth - 2 * marigin; return kScreenWidth - 2 * marigin;
......
...@@ -11,16 +11,18 @@ ...@@ -11,16 +11,18 @@
typedef void(^TapInformBlock)(void); typedef void(^TapInformBlock)(void);
typedef void(^TapLikeBlock)(void); typedef void(^TapLikeBlock)(void);
typedef void(^TapRemarkBlock)(void); typedef void(^TapRemarkBlock)(void);
typedef void(^TapSelectBlock)(BOOL selected);
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
/// 社区动态列表及动态详情cell /// 社区动态列表cell、动态详情cell、个人动态cell
@interface ComDynamicCell : UITableViewCell @interface ComDynamicCell : UITableViewCell
@property (nonatomic, strong) ComDynModel *model; @property (nonatomic, strong) ComDynModel *model;
@property (nonatomic, copy) TapInformBlock tapInformBlock; @property (nonatomic, copy) TapInformBlock tapInformBlock;
@property (nonatomic, copy) TapLikeBlock tapLikeBlock; @property (nonatomic, copy) TapLikeBlock tapLikeBlock;
@property (nonatomic, copy) TapRemarkBlock tapRemarkBlock; @property (nonatomic, copy) TapRemarkBlock tapRemarkBlock;
@property (nonatomic, copy) TapSelectBlock tapSelectBlock;
/// 启动点赞动画 /// 启动点赞动画
- (void)fireLikeAnimate; - (void)fireLikeAnimate;
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
@property (nonatomic, strong) UILabel *contentLab; @property (nonatomic, strong) UILabel *contentLab;
@property (nonatomic, strong) LikeButton *likeBtn; @property (nonatomic, strong) LikeButton *likeBtn;
@property (nonatomic, strong) UIButton *remarkCountBtn; @property (nonatomic, strong) UIButton *remarkCountBtn;
@property (nonatomic, strong) UIButton *selectBtn;
@property (nonatomic, strong) NSMutableArray *photos; @property (nonatomic, strong) NSMutableArray *photos;
@end @end
...@@ -42,12 +43,23 @@ ...@@ -42,12 +43,23 @@
[self.contentView addSubview:self.likeBtn]; [self.contentView addSubview:self.likeBtn];
[self.contentView addSubview:self.remarkCountBtn]; [self.contentView addSubview:self.remarkCountBtn];
if (type == DynModelTypeCom) { if (type == DynModelTypeDetail) {
[self cornerRadius:24.0];
self.dk_backgroundColorPicker = DKColorPickerWithColors(DSWhite, CornerViewDarkColor, DSWhite);
} else {
[self hideNeedlessView]; [self hideNeedlessView];
self.backgroundColor = DSClearColor; self.backgroundColor = DSClearColor;
} else {
[self cornerRadius:24.0];
self.dk_backgroundColorPicker = DKColorPickerWithColors(DSWhite, CornerViewDarkColor, DSWhite);
if (type == DynModelTypeMyDyn) {
self.informBtn.hidden = YES;
self.remarkCountBtn.userInteractionEnabled = NO;
[self.contentView addSubview:self.selectBtn];
[self.selectBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.contentView).offset(-self.margin);
make.top.equalTo(self.contentView).offset(self.margin);
}];
}
} }
[self.userIcon mas_makeConstraints:^(MASConstraintMaker *make) { [self.userIcon mas_makeConstraints:^(MASConstraintMaker *make) {
...@@ -107,6 +119,7 @@ ...@@ -107,6 +119,7 @@
self.contentLab.attributedText = [model contentAttriStr]; self.contentLab.attributedText = [model contentAttriStr];
[self.likeBtn updateLikeBtnState:model.isLike likeCount:model.likeCount]; [self.likeBtn updateLikeBtnState:model.isLike likeCount:model.likeCount];
[self.remarkCountBtn setTitle:[NSString stringWithFormat:@"%d", model.remarkCount] forState:UIControlStateNormal]; [self.remarkCountBtn setTitle:[NSString stringWithFormat:@"%d", model.remarkCount] forState:UIControlStateNormal];
self.selectBtn.hidden = !model.isEdited;
[self.contentLab mas_remakeConstraints:^(MASConstraintMaker *make) { [self.contentLab mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.userIcon.mas_bottom).offset(12); make.top.equalTo(self.userIcon.mas_bottom).offset(12);
...@@ -161,6 +174,14 @@ ...@@ -161,6 +174,14 @@
[browser showFromVC:self.ds_viewController]; [browser showFromVC:self.ds_viewController];
} }
- (void)selectAction:(UIButton *)sender {
sender.selected = !sender.selected;
if (self.tapSelectBlock) {
self.tapSelectBlock(sender.selected);
}
}
#pragma mark - lazy #pragma mark - lazy
- (UIImageView *)userIcon { - (UIImageView *)userIcon {
if (!_userIcon) { if (!_userIcon) {
...@@ -244,4 +265,15 @@ ...@@ -244,4 +265,15 @@
return _remarkCountBtn; return _remarkCountBtn;
} }
- (UIButton *)selectBtn {
if (!_selectBtn) {
_selectBtn = [UIButton new];
_selectBtn.hidden = YES;
[_selectBtn addTarget:self action:@selector(selectAction:) forControlEvents:UIControlEventTouchUpInside];
[_selectBtn dk_setImage:DKImagePickerWithNames(@"ic_person_xuanze", @"dk_ic_person_xuanze", @"ic_person_xuanze") forState:UIControlStateNormal];
[_selectBtn dk_setImage:DKImagePickerWithNames(@"ic_person_xuanzhong", @"dk_ic_person_xuanzhong", @"ic_person_xuanzhong") forState:UIControlStateSelected];
}
return _selectBtn;
}
@end @end
...@@ -30,10 +30,6 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -30,10 +30,6 @@ NS_ASSUME_NONNULL_BEGIN
/// 显示全部官方动态内容 /// 显示全部官方动态内容
- (void)showOfficialAllContent; - (void)showOfficialAllContent;
/// 删除个人社区动态
/// @param dynamicID 动态id
- (void)deleteComDynWithDynamicID:(int)dynamicID;
/// 临时插入用户动态数据 /// 临时插入用户动态数据
/// @param dyModel dyModel /// @param dyModel dyModel
- (void)insertUserDyModel:(ComDynModel *)dyModel; - (void)insertUserDyModel:(ComDynModel *)dyModel;
......
...@@ -71,17 +71,6 @@ ...@@ -71,17 +71,6 @@
self.resultModel.officialMessageModel.isShowAllContent = YES; self.resultModel.officialMessageModel.isShowAllContent = YES;
} }
- (void)deleteComDynWithDynamicID:(int)dynamicID {
NSMutableArray *tmpListArr = [NSMutableArray arrayWithArray:self.listArr];
[tmpListArr enumerateObjectsUsingBlock:^(ComDynModel * obj, NSUInteger idx, BOOL * _Nonnull stop) {
if (obj.dynamicID == dynamicID) {
*stop = YES;
[tmpListArr removeObject:obj];
}
}];
self.listArr = tmpListArr.copy;
}
- (void)insertUserDyModel:(ComDynModel *)dyModel { - (void)insertUserDyModel:(ComDynModel *)dyModel {
if (!dyModel) { return; } if (!dyModel) { return; }
// 用户发的说说临时插入到动态列表第一条 // 用户发的说说临时插入到动态列表第一条
......
//
// MyDynamicController.h
// DreamSleep
//
// Created by peter on 2022/10/19.
//
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
/// 我的动态列表页面
@interface MyDynamicController : BaseViewController
@end
NS_ASSUME_NONNULL_END
//
// MyDynamicController.m
// DreamSleep
//
// Created by peter on 2022/10/19.
//
#import "MyDynamicController.h"
#import "DynamicDetailController.h"
#import "MyDynamicView.h"
#import "ComListViewModel.h"
@interface MyDynamicController () <MyDynamicViewDelegate, DynamicDetailControllerDelegate>
@property (nonatomic, assign) int offset;
@property (nonatomic, strong) MyDynamicView *myDynamicView;
@property (nonatomic, strong) PersonDynViewModel *myDynVM;
@property (nonatomic, strong) NSURLSessionDataTask *likeDataTask;
@end
@implementation MyDynamicController
- (void)loadView {
self.myDynVM = [PersonDynViewModel new];
self.view = self.myDynamicView;
}
- (void)viewDidLoad {
[super viewDidLoad];
self.offset = 1;
self.navigationItem.title = @"我的动态";
self.edgesForExtendedLayout = UIRectEdgeNone;
UIButton *manageBtn = [UIButton btnWithTitle:@"管理" font:BoldFont(15)];
[manageBtn dk_setTitleColorPicker:DKColorPickerWithColors(DSWhite, DkTitleColor, DSWhite) forState:UIControlStateNormal];
[manageBtn addTarget:self action:@selector(manageAction) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:manageBtn];
}
- (void)testDynDeleteAPI {
#warning - 测试删除接口
self.myDynVM = [PersonDynViewModel new];
self.myDynVM.oper_type = @"comment";
self.myDynVM.delete_id = 18;
[self.myDynVM communityDeleteOperationWithCompletion:^(PersonDynViewModel * _Nonnull requestModel) {
if (requestModel.resCode == DSResCodeSuccess) {
[self.myDynVM deleteComDynWithDynamicID:self.myDynVM.delete_id];
[self.myDynamicView updateListView];
} else {
[DSProgressHUD showToast:requestModel.errMessage];
}
}];
}
#pragma mark - private
- (void)manageAction {
[self.myDynVM beginEditMode];
[self.myDynamicView updateListView];
}
#pragma mark - MyDynamicViewDelegate
- (void)getDynamicListRequest:(BOOL)loadMore {
if (loadMore == NO) { self.offset = 1; }
[self.myDynVM queryUserDynamicListWithLoadMore:loadMore offset:self.offset completion:^(PersonDynViewModel * _Nonnull requestModel) {
if (requestModel.resCode == DSResCodeSuccess) {
if (requestModel.latestDataList.count == 0) {
if (loadMore) {
[self.myDynamicView endRefreshingWithNoMoreData];
} else {
[self.myDynamicView endRefreshing:NO];
}
} else {
self.offset++;
[self.myDynamicView updateCommunityMoments:loadMore];
}
} else {
[DSProgressHUD showToast:requestModel.errMessage];
[self.myDynamicView endRefreshing:loadMore];
}
}];
}
- (void)didSelectItemWithModel:(ComDynModel *)comDynModel {
if (![LoginUtils getUserLoginData]) {
[LoginUtils jumpToLoginControllerWithTarget:self];
return;
}
DynamicDetailController *detailVC = [DynamicDetailController new];
detailVC.comDynModel = comDynModel;
detailVC.delegate = self;
[self.navigationController pushViewController:detailVC animated:YES];
}
- (void)didTapLikeItem:(ComDynModel *)comDynModel cell:(ComDynamicCell *)cell {
if (![LoginUtils getUserLoginData]) {
[LoginUtils jumpToLoginControllerWithTarget:self];
return;
}
// 1、用户点赞或取消点赞直接响应UI变化
[ComListViewModel updateLikeData:comDynModel];
[cell fireLikeAnimate];
[cell updateLikeUI];
// 2、更新点赞或取消点赞请求
if (self.likeDataTask) { [self.likeDataTask cancel]; }
self.likeDataTask = [ComListViewModel userDynamicPraiseWithComDynModel:comDynModel completion:^(ComListViewModel * _Nonnull requestModel) {
// 3、如果请求失败,延迟执行回退
if (requestModel.resCode != DSResCodeSuccess) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[cell updateLikeUI];
[DSProgressHUD showToast:requestModel.errMessage];
});
}
}];
}
#pragma mark - DynamicDetailControllerDelegate
- (void)updateLikeOrRemark {
[self.myDynamicView updateListView];
}
#pragma mark - 关闭侧滑
- (BOOL)enableInteractivePopGestureRecognizer {
return NO;
}
#pragma mark - lazy
- (MyDynamicView *)myDynamicView {
if (!_myDynamicView) {
_myDynamicView = [[MyDynamicView alloc] initWithDelegate:self myDynViewModel:self.myDynVM];
}
return _myDynamicView;
}
@end
//
// MyDynamicListResultModel.h
// DreamSleep
//
// Created by peter on 2022/10/19.
//
#import <Foundation/Foundation.h>
#import "ComDynModel.h"
NS_ASSUME_NONNULL_BEGIN
/// 我的动态列表结果数据model
@interface MyDynamicListResultModel : NSObject
/// 我的总动态数
@property (nonatomic, assign) int count;
/// 用户动态列表
@property (nonatomic, strong) NSArray<ComDynModel *> *dataList;
@end
NS_ASSUME_NONNULL_END
//
// MyDynamicListResultModel.m
// DreamSleep
//
// Created by peter on 2022/10/19.
//
#import "MyDynamicListResultModel.h"
@implementation MyDynamicListResultModel
+ (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper {
return @{@"dataList" : @"data_list"
};
}
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"dataList":[ComDynModel class]};
}
@end
//
// MyDynamicView.h
// DreamSleep
//
// Created by peter on 2022/10/19.
//
#import <UIKit/UIKit.h>
#import "ComDynamicCell.h"
#import "PersonDynViewModel.h"
NS_ASSUME_NONNULL_BEGIN
@protocol MyDynamicViewDelegate <NSObject>
/// 获取我的动态列表请求
- (void)getDynamicListRequest:(BOOL)loadMore;
/// 点击动态进入我的动态详情
/// @param comDynModel comDynModel
- (void)didSelectItemWithModel:(ComDynModel *)comDynModel;
/// 点赞按钮
/// @param comDynModel 动态数据model
/// @param cell cell
- (void)didTapLikeItem:(ComDynModel *)comDynModel cell:(ComDynamicCell *)cell;
@end
/// 我的动态主视图
@interface MyDynamicView : UIView
@property (nonatomic, weak) id<MyDynamicViewDelegate> delegate;
- (instancetype)initWithDelegate:(id<MyDynamicViewDelegate>)delegate myDynViewModel:(PersonDynViewModel *)myDynViewModel;
/// 更新社区动态
- (void)updateCommunityMoments:(BOOL)loadMore;
/// 结束加载动画
- (void)endRefreshing:(BOOL)loadMore;
- (void)endRefreshingWithNoMoreData;
/// 更新列表
- (void)updateListView;
@end
NS_ASSUME_NONNULL_END
//
// MyDynamicView.m
// DreamSleep
//
// Created by peter on 2022/10/19.
//
#import "MyDynamicView.h"
@interface MyDynamicView () <UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, strong) UITableView *listView;
@property (nonatomic, strong) PersonDynViewModel *myDynVM;
@property (nonatomic, strong) UIView *deleteView;
@property (nonatomic, strong) UIButton *allSelectBtn;
@end
@implementation MyDynamicView
#pragma mark - 初始化
- (instancetype)initWithDelegate:(id<MyDynamicViewDelegate>)delegate myDynViewModel:(PersonDynViewModel *)myDynViewModel {
if (self = [super init]) {
self.delegate = delegate;
self.myDynVM = myDynViewModel;
self.dk_backgroundColorPicker = DKColorPickerWithKey(VCViewBG);
[self addSubview:self.listView];
// [self addSubview:self.deleteView];
}
return self;
}
- (void)layoutSubviews {
self.listView.frame = CGRectMake(15, 0, self.width - 30, self.height);
}
#pragma mark - public
- (void)updateCommunityMoments:(BOOL)loadMore {
[self endRefreshing:loadMore];
[self.listView reloadData];
}
- (void)endRefreshing:(BOOL)loadMore {
if (loadMore) {
[self.listView.mj_footer endRefreshing];
} else {
[self.listView.mj_header endRefreshing];
[self.listView.mj_footer resetNoMoreData];
}
}
- (void)endRefreshingWithNoMoreData {
[self.listView.mj_footer endRefreshingWithNoMoreData];
}
- (void)updateListView {
[self.listView reloadData];
}
#pragma mark - private
- (void)allSelectAction {
}
#pragma mark - UITableViewDelegate, UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return self.myDynVM.listArr.count;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 1;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
ComDynModel *model = self.myDynVM.listArr[indexPath.section];
return [model cellHeight];
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
return section == 0 ? 15 : CGFLOAT_MIN;
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
return [UIView new];
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
return section == self.myDynVM.listArr.count - 1 ? 6.5 : 12;;
}
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
return [UIView new];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
WS(weakSelf);
ComDynamicCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([ComDynamicCell class])];
if (!cell) {
cell = [[ComDynamicCell alloc] initWithCellType:DynModelTypeMyDyn style:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([ComDynamicCell class])];
}
ComDynModel *model = self.myDynVM.listArr[indexPath.section];
cell.model = model;
__weak ComDynamicCell * weakCell = (ComDynamicCell *)cell;
cell.tapLikeBlock = ^{
if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(didTapLikeItem:cell:)]) {
[weakSelf.delegate didTapLikeItem:model cell:weakCell];
}
};
cell.tapRemarkBlock = ^{
[weakSelf tableView:tableView didSelectRowAtIndexPath:indexPath];
};
cell.tapSelectBlock = ^(BOOL selected) {
[weakSelf.myDynVM updateMyDynamicModel:model selected:selected];
};
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
ComDynModel *model = self.myDynVM.listArr[indexPath.section];
if (self.delegate && [self.delegate respondsToSelector:@selector(didSelectItemWithModel:)]) {
[self.delegate didSelectItemWithModel:model];
}
}
#pragma mark - lazy
- (UITableView *)listView {
if (!_listView) {
_listView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
_listView.delegate = self;
_listView.dataSource = self;
_listView.backgroundColor = DSClearColor;
_listView.showsVerticalScrollIndicator = NO;
_listView.separatorStyle = UITableViewCellSeparatorStyleNone;
_listView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
WS(weakSelf);
_listView.mj_header = [DSGifHeader headerWithRefreshingBlock:^{
if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(getDynamicListRequest:)]) {
[weakSelf.delegate getDynamicListRequest:NO];
}
}];
[_listView.mj_header beginRefreshing];
_listView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(getDynamicListRequest:)]) {
[weakSelf.delegate getDynamicListRequest:YES];
}
}];
}
return _listView;
}
- (UIView *)deleteView {
if (!_deleteView) {
_deleteView = [UIView new];
_deleteView.dk_backgroundColorPicker = DKColorPickerWithKey(TabBarBG);
UIButton *allSelectBtn = [UIButton btnWithTitle:@"全选" font:SysFont(15)];
[allSelectBtn dk_setTitleColorPicker:DKColorPickerWithKey(Dk_TITLE) forState:UIControlStateNormal];
[allSelectBtn addTarget:self action:@selector(allSelectAction) forControlEvents:UIControlEventTouchUpInside];
[allSelectBtn dk_setImage:DKImagePickerWithNames(@"ic_person_xuanze", @"dk_ic_person_xuanze", @"ic_person_xuanze") forState:UIControlStateNormal];
[allSelectBtn dk_setImage:DKImagePickerWithNames(@"ic_person_xuanzhong", @"dk_ic_person_xuanzhong", @"ic_person_xuanzhong") forState:UIControlStateSelected];
allSelectBtn.imageEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 7);
[_deleteView addSubview:allSelectBtn];
self.allSelectBtn = allSelectBtn;
UIButton *deleteBtn = [UIButton btnWithTitle:@"删除" font:BoldFont(18)];
[deleteBtn dk_setTitleColorPicker:DKColorPickerWithKey(Sub_Navi_TITLE) forState:UIControlStateNormal];
deleteBtn.dk_backgroundColorPicker = DKColorPickerWithKey(BrandBG);
[_deleteView addSubview:deleteBtn];
[allSelectBtn mas_makeConstraints:^(MASConstraintMaker *make) {
}];
}
return _deleteView;
}
@end
...@@ -12,6 +12,11 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -12,6 +12,11 @@ NS_ASSUME_NONNULL_BEGIN
/// 个人中心动态相关viewModel /// 个人中心动态相关viewModel
@interface PersonDynViewModel : DSNetworkTool @interface PersonDynViewModel : DSNetworkTool
/// 服务器返回最新某一页的列表数据
@property (nonatomic, strong) NSArray *latestDataList;
/// 对外提供的我的动态列表数据
@property (nonatomic, strong) NSArray *listArr;
/* /*
删除操作选项类别 删除操作选项类别
dynamic:删除动态 comment:删除评论 reply:删除回复 dynamic:删除动态 comment:删除评论 reply:删除回复
...@@ -24,10 +29,25 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -24,10 +29,25 @@ NS_ASSUME_NONNULL_BEGIN
*/ */
@property (nonatomic, assign) int delete_id; @property (nonatomic, assign) int delete_id;
/// 我的动态列表接口
/// @param loadMore 上下拉标识
/// @param offset offset
/// @param completion completion
- (NSURLSessionDataTask *)queryUserDynamicListWithLoadMore:(BOOL)loadMore offset:(int)offset completion:(void (^)(PersonDynViewModel *requestModel))completion;
/// 用户-删除动态,评论,回复接口 /// 用户-删除动态,评论,回复接口
/// @param completion completion /// @param completion completion
- (NSURLSessionDataTask *)communityDeleteOperationWithCompletion:(void (^)(PersonDynViewModel *requestModel))completion; - (NSURLSessionDataTask *)communityDeleteOperationWithCompletion:(void (^)(PersonDynViewModel *requestModel))completion;
/// 删除个人社区动态
/// @param dynamicID 动态id
- (void)deleteComDynWithDynamicID:(int)dynamicID;
/// 开启编辑模式
- (void)beginEditMode;
- (void)updateMyDynamicModel:(id)model selected:(BOOL)selected;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
...@@ -6,9 +6,45 @@ ...@@ -6,9 +6,45 @@
// //
#import "PersonDynViewModel.h" #import "PersonDynViewModel.h"
#import "MyDynamicListResultModel.h"
@interface PersonDynViewModel ()
/// 我的动态列表结果数据model
@property (nonatomic, strong) MyDynamicListResultModel *resultModel;
@end
@implementation PersonDynViewModel @implementation PersonDynViewModel
- (NSURLSessionDataTask *)queryUserDynamicListWithLoadMore:(BOOL)loadMore offset:(int)offset completion:(void (^)(PersonDynViewModel *requestModel))completion {
NSString *api = @"query_user_dynamic_list";
NSString *argStr = [NSString stringWithFormat:@"query{%@(offset:%d)}", api, offset];
return [PersonDynViewModel httpPostBodyRequestWithAPI:api params:@{@"query" : argStr} view:nil hasNetActivity:YES loadingInfo:nil hasFailInfo:NO success:^(NSDictionary * _Nonnull apiDic) {
DSLog(@"我的动态列表接口apiDic:%@", apiDic);
// 1、解析数据
self.resCode = DSResCodeSuccess;
self.resultModel = [MyDynamicListResultModel yy_modelWithDictionary:apiDic[@"result"]];
// 2、根据业务需要的数据结构对数据进行加工
NSArray *latest_data_list = self.resultModel.dataList ?: @[];
self.latestDataList = latest_data_list;
if (loadMore) {
NSMutableArray *tmp_list_arr = [NSMutableArray arrayWithArray:self.listArr];
[tmp_list_arr addObjectsFromArray:latest_data_list.copy];
self.listArr = tmp_list_arr.copy;
} else {
self.listArr = latest_data_list.copy;
}
// 3、给model标记类型
[self.listArr enumerateObjectsUsingBlock:^(ComDynModel * obj, NSUInteger idx, BOOL * _Nonnull stop) {
obj.modelType = DynModelTypeMyDyn;
}];
completion(self);
} failure:^(id _Nonnull failureInfo) {
self.resCode = [failureInfo[@"errorCode"] integerValue];
self.errMessage = failureInfo[@"errMessage"];
completion(self);
}];
}
- (NSURLSessionDataTask *)communityDeleteOperationWithCompletion:(void (^)(PersonDynViewModel *requestModel))completion { - (NSURLSessionDataTask *)communityDeleteOperationWithCompletion:(void (^)(PersonDynViewModel *requestModel))completion {
NSString *api = @"community_delete_operation"; NSString *api = @"community_delete_operation";
NSString *argStr = [NSString stringWithFormat:@"mutation{%@(oper_type:\"%@\",delete_id:%d)}", api, self.oper_type, self.delete_id]; NSString *argStr = [NSString stringWithFormat:@"mutation{%@(oper_type:\"%@\",delete_id:%d)}", api, self.oper_type, self.delete_id];
...@@ -23,4 +59,26 @@ ...@@ -23,4 +59,26 @@
}]; }];
} }
- (void)deleteComDynWithDynamicID:(int)dynamicID {
NSMutableArray *tmpListArr = [NSMutableArray arrayWithArray:self.listArr];
[tmpListArr enumerateObjectsUsingBlock:^(ComDynModel * obj, NSUInteger idx, BOOL * _Nonnull stop) {
if (obj.dynamicID == dynamicID) {
*stop = YES;
[tmpListArr removeObject:obj];
}
}];
self.listArr = tmpListArr.copy;
}
- (void)beginEditMode {
[self.listArr enumerateObjectsUsingBlock:^(ComDynModel * obj, NSUInteger idx, BOOL * _Nonnull stop) {
obj.isEdited = YES;
}];
}
- (void)updateMyDynamicModel:(id)model selected:(BOOL)selected {
ComDynModel *obj = model;
obj.selected = selected;
}
@end @end
...@@ -140,6 +140,10 @@ ...@@ -140,6 +140,10 @@
} }
} }
- (void)enterMyDynamicList {
[self jumpViewController:@"MyDynamicController"];
}
#pragma mark - Actions #pragma mark - Actions
- (void)modifyUserInfoAction { - (void)modifyUserInfoAction {
// 账户与资料页面 // 账户与资料页面
......
...@@ -12,6 +12,7 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -12,6 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
@protocol ProfileHeaderViewDelegate <NSObject> @protocol ProfileHeaderViewDelegate <NSObject>
- (void)didClickModifyUserBtn; - (void)didClickModifyUserBtn;
- (void)didClickScoreTaskBtn:(NSInteger)index; - (void)didClickScoreTaskBtn:(NSInteger)index;
- (void)jumpToMyDynamicModule;
@end @end
@interface ProfileHeaderView : UIView @interface ProfileHeaderView : UIView
......
...@@ -80,6 +80,12 @@ ...@@ -80,6 +80,12 @@
} }
} }
- (void)myDynAction {
if (self.delegate && [self.delegate respondsToSelector:@selector(jumpToMyDynamicModule)]) {
[self.delegate jumpToMyDynamicModule];
}
}
#pragma mark - life #pragma mark - life
- (instancetype)initWithDelegate:(id<ProfileHeaderViewDelegate>)delegate { - (instancetype)initWithDelegate:(id<ProfileHeaderViewDelegate>)delegate {
if (self = [super initWithFrame:CGRectMake(0, 0, 0, 0)]) { if (self = [super initWithFrame:CGRectMake(0, 0, 0, 0)]) {
...@@ -104,6 +110,11 @@ ...@@ -104,6 +110,11 @@
[self.userInfoView addSubview:meLab]; [self.userInfoView addSubview:meLab];
self.meLab = meLab; self.meLab = meLab;
UIButton *myDynBtn = [UIButton new];
[myDynBtn addTarget:self action:@selector(myDynAction) forControlEvents:UIControlEventTouchUpInside];
[myDynBtn dk_setImage:DKImagePickerWithNames(@"ic_person_wodedongtai", @"dk_ic_person_wodedongtai", @"ic_person_wodedongtai") forState:UIControlStateNormal];
[self.userInfoView addSubview:myDynBtn];
UIButton *bgBtn = [UIButton new]; UIButton *bgBtn = [UIButton new];
[bgBtn addTarget:self action:@selector(modifyAction) forControlEvents:UIControlEventTouchUpInside]; [bgBtn addTarget:self action:@selector(modifyAction) forControlEvents:UIControlEventTouchUpInside];
[self.userInfoView addSubview:bgBtn]; [self.userInfoView addSubview:bgBtn];
...@@ -136,6 +147,10 @@ ...@@ -136,6 +147,10 @@
make.left.equalTo(self).offset(15); make.left.equalTo(self).offset(15);
make.height.equalTo(@(meH)); make.height.equalTo(@(meH));
}]; }];
[myDynBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.meLab);
make.right.equalTo(self).offset(-15);
}];
[bgBtn mas_makeConstraints:^(MASConstraintMaker *make) { [bgBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.equalTo(self.userInfoView); make.left.right.bottom.equalTo(self.userInfoView);
make.height.equalTo(@60); make.height.equalTo(@60);
......
...@@ -15,6 +15,7 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -15,6 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)showNaviBar:(CGFloat)alpha; - (void)showNaviBar:(CGFloat)alpha;
- (void)isUpdateStatusStyle:(BOOL)isUpdate; - (void)isUpdateStatusStyle:(BOOL)isUpdate;
- (void)dealScoreTaskAction:(NSInteger)index; - (void)dealScoreTaskAction:(NSInteger)index;
- (void)enterMyDynamicList;
@end @end
/// 个人中心TableView /// 个人中心TableView
......
...@@ -238,6 +238,12 @@ ...@@ -238,6 +238,12 @@
} }
} }
- (void)jumpToMyDynamicModule {
if (self.profileDelegate && [self.profileDelegate respondsToSelector:@selector(enterMyDynamicList)] ) {
[self.profileDelegate enterMyDynamicList];
}
}
#pragma mark - lazy #pragma mark - lazy
- (NSArray *)profileGroupArr { - (NSArray *)profileGroupArr {
if (!_profileGroupArr) { if (!_profileGroupArr) {
......
{
"images" : [
{
"filename" : "dk_ic_person_wodedongtai.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dk_ic_person_wodedongtai@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dk_ic_person_wodedongtai@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "dk_ic_person_xuanze.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dk_ic_person_xuanze@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dk_ic_person_xuanze@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "dk_ic_person_xuanzhong.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dk_ic_person_xuanzhong@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dk_ic_person_xuanzhong@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "ic_person_wodedongtai.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ic_person_wodedongtai@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_person_wodedongtai@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "ic_person_xuanze.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ic_person_xuanze@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_person_xuanze@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "ic_person_xuanzhong.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ic_person_xuanzhong@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_person_xuanzhong@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!