Skip to content

Commit 3938072

Browse files
committed
空白页面 - 改版
1 parent dd3b139 commit 3938072

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+327
-189
lines changed

Coding_iOS.xcodeproj/project.pbxproj

Lines changed: 112 additions & 16 deletions
Large diffs are not rendered by default.

Coding_iOS/.DS_Store

0 Bytes
Binary file not shown.

Coding_iOS/Controllers/FileListViewController.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ - (void)sendRequestRootFolders{
240240
}else{
241241
[weakSelf.refreshControl endRefreshing];
242242
[weakSelf.view endLoading];
243-
[weakSelf.view configBlankPage:EaseBlankPageTypeView hasData:([weakSelf totalDataRow] > 0) hasError:YES reloadButtonBlock:^(id sender) {
243+
[weakSelf.view configBlankPage:EaseBlankPageTypeFile hasData:([weakSelf totalDataRow] > 0) hasError:YES reloadButtonBlock:^(id sender) {
244244
[weakSelf refreshRootFolders];
245245
}];
246246
}
@@ -271,7 +271,7 @@ - (void)sendRequestFileList{
271271

272272
[weakSelf.myTableView reloadData];
273273
}
274-
[weakSelf.view configBlankPage:EaseBlankPageTypeView hasData:([weakSelf totalDataRow] > 0) hasError:(error != nil) reloadButtonBlock:^(id sender) {
274+
[weakSelf.view configBlankPage:EaseBlankPageTypeFile hasData:([weakSelf totalDataRow] > 0) hasError:(error != nil) reloadButtonBlock:^(id sender) {
275275
[weakSelf refreshRootFolders];
276276
}];
277277
}];
@@ -321,7 +321,7 @@ - (void)creatFolderBtnClicked{
321321
[weakSelf.rootFolders.list insertObject:data atIndex:1];
322322
}
323323
[weakSelf.myTableView reloadData];
324-
[weakSelf.view configBlankPage:EaseBlankPageTypeView hasData:([weakSelf totalDataRow] > 0) hasError:(error != nil) reloadButtonBlock:^(id sender) {
324+
[weakSelf.view configBlankPage:EaseBlankPageTypeFile hasData:([weakSelf totalDataRow] > 0) hasError:(error != nil) reloadButtonBlock:^(id sender) {
325325
[weakSelf refreshRootFolders];
326326
}];
327327
[NSObject showHudTipStr:@"创建文件夹成功"];
@@ -432,7 +432,7 @@ - (void)qb_imagePickerController:(QBImagePickerController *)imagePickerControlle
432432
for (NSString *fileName in needToUploads) {
433433
[self uploadFileWithFileName:fileName];
434434
}
435-
[self.view configBlankPage:EaseBlankPageTypeView hasData:([self totalDataRow] > 0) hasError:NO reloadButtonBlock:^(id sender) {
435+
[self.view configBlankPage:EaseBlankPageTypeFile hasData:([self totalDataRow] > 0) hasError:NO reloadButtonBlock:^(id sender) {
436436
[self refreshRootFolders];
437437
}];
438438

@@ -475,7 +475,7 @@ - (void)completionUploadWithResult:(id)responseObject error:(NSError *)error{
475475
[self.myFiles.list insertObject:curFile atIndex:0];
476476
self.curFolder.count = @(self.curFolder.count.integerValue +1);
477477
[self configuploadFiles];
478-
[self.view configBlankPage:EaseBlankPageTypeView hasData:([self totalDataRow] > 0) hasError:(error != nil) reloadButtonBlock:^(id sender) {
478+
[self.view configBlankPage:EaseBlankPageTypeFile hasData:([self totalDataRow] > 0) hasError:(error != nil) reloadButtonBlock:^(id sender) {
479479
[self refreshRootFolders];
480480
}];
481481
if (self.navigationItem.rightBarButtonItem == nil) {
@@ -644,7 +644,7 @@ - (void)deleteFolder:(ProjectFolder *)folder{
644644
[weakSelf.curFolder.sub_folders removeObject:originalFolder];
645645
weakSelf.curFolder.count = [NSNumber numberWithInt:weakSelf.curFolder.count.intValue-1];
646646
[weakSelf.myTableView reloadData];
647-
[weakSelf.view configBlankPage:EaseBlankPageTypeView hasData:([weakSelf totalDataRow] > 0) hasError:(error != nil) reloadButtonBlock:^(id sender) {
647+
[weakSelf.view configBlankPage:EaseBlankPageTypeFile hasData:([weakSelf totalDataRow] > 0) hasError:(error != nil) reloadButtonBlock:^(id sender) {
648648
[weakSelf refreshRootFolders];
649649
}];
650650
}

Coding_iOS/Controllers/MeDisplayViewController.m

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ - (void)requestTopicsMore:(BOOL)loadMore{
148148
weakSelf.myTableView.showsInfiniteScrolling = hasMoreData;
149149
}
150150

151-
CGFloat offsetY = _userInfoCell.frame.size.height + [UserActiveGraphCell cellHeight] + 100;
151+
CGFloat offsetY = _userInfoCell.frame.size.height + [UserActiveGraphCell cellHeight] + 80;
152152
[weakSelf.view configBlankPage:EaseBlankPageTypeMyJoinedTopic hasData:weakSelf.dataList.count > 0 hasError:error != nil offsetY:offsetY reloadButtonBlock:^(id sender) {
153153
[weakSelf refresh];
154154
}];
@@ -211,8 +211,13 @@ - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger
211211
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
212212
if (section < 2) {
213213
return 20;
214+
}else{
215+
if (_dataIndex == 0) {
216+
return 0;
217+
}else{
218+
return _dataList.count == 0? self.view.height - self.sectionHeaderView.height: 0;
219+
}
214220
}
215-
return 0;
216221
}
217222

218223
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{

Coding_iOS/Controllers/NProjectViewController/NProjectViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ - (void)refresh{
100100
[[Coding_NetAPIManager sharedManager] request_ProjectDetail_WithObj:_myProject andBlock:^(id data, NSError *error) {
101101
if (data) {
102102
weakSelf.myProject = data;
103-
weakSelf.navigationItem.rightBarButtonItem = weakSelf.myProject.is_public.boolValue? nil: [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"tweetsBtn_Nav"] style:UIBarButtonItemStylePlain target:self action:@selector(tweetsBtnClicked)];
103+
weakSelf.navigationItem.rightBarButtonItem = weakSelf.myProject.is_public.boolValue? nil: [UIBarButtonItem itemWithBtnTitle:@"公告" target:self action:@selector(tweetsBtnClicked)];
104104
[self refreshGitButtonsView];
105105
[weakSelf.myTableView reloadData];
106106
}

Coding_iOS/Controllers/RootControllers/Message_RootViewController.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ - (void)refresh{
122122
if (data) {
123123
weakSelf.notificationDict = [NSMutableDictionary dictionaryWithDictionary:data];
124124
[weakSelf.myTableView reloadData];
125+
[weakSelf.myTableView configBlankPage:EaseBlankPageTypeMessageList hasData:(weakSelf.myPriMsgs.list.count > 0) hasError:(error != nil) offsetY:(3 * [ToMessageCell cellHeight]) reloadButtonBlock:^(id sender) {
126+
[weakSelf refresh];
127+
}];
125128
}
126129
}];
127130
[[UnReadManager shareManager] updateUnRead];
@@ -150,6 +153,9 @@ - (void)sendRequest_PrivateMessages{
150153
[weakSelf.myPriMsgs configWithObj:data];
151154
[weakSelf.myTableView reloadData];
152155
weakSelf.myTableView.showsInfiniteScrolling = weakSelf.myPriMsgs.canLoadMore;
156+
[weakSelf.myTableView configBlankPage:EaseBlankPageTypeMessageList hasData:(weakSelf.myPriMsgs.list.count > 0) hasError:(error != nil) offsetY:(3 * [ToMessageCell cellHeight]) reloadButtonBlock:^(id sender) {
157+
[weakSelf refresh];
158+
}];
153159
}
154160
}];
155161
}
@@ -244,6 +250,9 @@ - (void)removeConversation:(PrivateMessage *)curMsg inTableView:(UITableView *)t
244250
if (data) {
245251
[weakSelf.myPriMsgs.list removeObject:data];
246252
[weakSelf.myTableView reloadData];
253+
[weakSelf.myTableView configBlankPage:EaseBlankPageTypeMessageList hasData:(weakSelf.myPriMsgs.list.count > 0) hasError:(error != nil) offsetY:(3 * [ToMessageCell cellHeight]) reloadButtonBlock:^(id sender) {
254+
[weakSelf refresh];
255+
}];
247256
}
248257
}];
249258
}

Coding_iOS/Controllers/TeamListViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ - (void)refresh{
5454
weakSelf.teamList = data;
5555
[weakSelf.myTableView reloadData];
5656
}
57-
[weakSelf.myTableView configBlankPage:EaseBlankPageTypeView hasData:(weakSelf.teamList.count > 0) hasError:(error != nil) reloadButtonBlock:^(id sender) {
57+
[weakSelf.myTableView configBlankPage:EaseBlankPageTypeTeam hasData:(weakSelf.teamList.count > 0) hasError:(error != nil) reloadButtonBlock:^(id sender) {
5858
[weakSelf refresh];
5959
}];
6060
}];

Coding_iOS/Controllers/UserOrProjectTweetsViewController.m

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,22 @@ - (void)messageInputView:(UIMessageInputView *)inputView heightToBottomChenged:(
147147

148148

149149
#pragma mark M
150+
- (EaseBlankPageType)blankType{
151+
EaseBlankPageType blankType = ([[Login curLoginUser] isSameToUser:self.curTweets.curUser]? EaseBlankPageTypeTweet:
152+
_curTweets.tweetType == TweetTypeProject? EaseBlankPageTypeTweetProject:
153+
EaseBlankPageTypeTweetOther);
154+
return blankType;
155+
}
156+
150157
- (void)deleteTweet:(Tweet *)curTweet outTweetsIndex:(NSInteger)outTweetsIndex{
151158
ESWeakSelf;
152159
[[Coding_NetAPIManager sharedManager] request_Tweet_Delete_WithObj:curTweet andBlock:^(id data, NSError *error) {
153160
ESStrongSelf;
154161
if (data) {
155162
[_self.curTweets.list removeObject:curTweet];
156163
[_self.myTableView reloadData];
157-
[_self.view configBlankPage:([[Login curLoginUser] isSameToUser:_self.curTweets.curUser]? EaseBlankPageTypeTweet: EaseBlankPageTypeTweetOther) hasData:(_self.curTweets.list.count > 0) hasError:NO offsetY:[_self blankPageOffsetY] reloadButtonBlock:^(id sender) {
164+
165+
[_self.view configBlankPage:[_self blankType] hasData:(_self.curTweets.list.count > 0) hasError:NO offsetY:[_self blankPageOffsetY] reloadButtonBlock:^(id sender) {
158166
ESStrongSelf;
159167
[_self sendRequest];
160168
}];
@@ -206,7 +214,7 @@ - (void)sendRequest{
206214
[weakSelf.myTableView reloadData];
207215
weakSelf.myTableView.showsInfiniteScrolling = weakSelf.curTweets.canLoadMore;
208216
}
209-
[weakSelf.view configBlankPage:([[Login curLoginUser] isSameToUser:self.curTweets.curUser]? EaseBlankPageTypeTweet: EaseBlankPageTypeTweetOther) hasData:(weakSelf.curTweets.list.count > 0) hasError:(error != nil) offsetY:[weakSelf blankPageOffsetY] reloadButtonBlock:^(id sender) {
217+
[weakSelf.view configBlankPage:[weakSelf blankType] hasData:(weakSelf.curTweets.list.count > 0) hasError:(error != nil) offsetY:[weakSelf blankPageOffsetY] reloadButtonBlock:^(id sender) {
210218
[weakSelf sendRequest];
211219
}];
212220
}];
@@ -215,7 +223,7 @@ - (void)sendRequest{
215223
- (CGFloat)blankPageOffsetY{//MeDisplayViewController
216224
CGFloat offsetY = 0;
217225
if ([self isMemberOfClass:NSClassFromString(@"MeDisplayViewController")]) {
218-
offsetY = ((UITableViewCell *)[self valueForKey:@"userInfoCell"]).frame.size.height + [UserActiveGraphCell cellHeight] + 100;
226+
offsetY = ((UITableViewCell *)[self valueForKey:@"userInfoCell"]).frame.size.height + [UserActiveGraphCell cellHeight] + 80;
219227
}
220228
return offsetY;
221229
}
@@ -229,7 +237,7 @@ - (void)refreshCurUser{
229237
[weakSelf sendRequest];
230238
}else{
231239
[weakSelf.view endLoading];
232-
[weakSelf.view configBlankPage:([[Login curLoginUser] isSameToUser:self.curTweets.curUser]? EaseBlankPageTypeTweet: EaseBlankPageTypeTweetOther) hasData:(weakSelf.curTweets.list.count > 0) hasError:YES offsetY:[weakSelf blankPageOffsetY] reloadButtonBlock:^(id sender) {
240+
[weakSelf.view configBlankPage:[weakSelf blankType] hasData:(weakSelf.curTweets.list.count > 0) hasError:YES offsetY:[weakSelf blankPageOffsetY] reloadButtonBlock:^(id sender) {
233241
[weakSelf sendRequest];
234242
}];
235243
}
@@ -336,7 +344,7 @@ - (void)goToDetailWithTweet:(Tweet *)curTweet{
336344
vc.deleteTweetBlock = ^(Tweet *toDeleteTweet){
337345
[weakSelf.curTweets.list removeObject:toDeleteTweet];
338346
[weakSelf.myTableView reloadData];
339-
[weakSelf.view configBlankPage:([[Login curLoginUser] isSameToUser:self.curTweets.curUser]? EaseBlankPageTypeTweet: EaseBlankPageTypeTweetOther) hasData:(weakSelf.curTweets.list.count > 0) hasError:NO offsetY:[weakSelf blankPageOffsetY] reloadButtonBlock:^(id sender) {
347+
[weakSelf.view configBlankPage:[weakSelf blankType] hasData:(weakSelf.curTweets.list.count > 0) hasError:NO offsetY:[weakSelf blankPageOffsetY] reloadButtonBlock:^(id sender) {
340348
[weakSelf sendRequest];
341349
}];
342350
};
Binary file not shown.
Loading
Loading
Loading
Loading
Loading
Loading
Binary file not shown.
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Binary file not shown.
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
8.57 KB
Loading

Coding_iOS/Util/OC_Category/UIView+Common.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ typedef NS_ENUM(NSInteger, EaseBlankPageType)
2222
EaseBlankPageTypeTopic,
2323
EaseBlankPageTypeTweet,
2424
EaseBlankPageTypeTweetOther,
25+
EaseBlankPageTypeTweetProject,
2526
EaseBlankPageTypeProject,
2627
EaseBlankPageTypeProjectOther,
2728
EaseBlankPageTypeFileDleted,
@@ -44,6 +45,9 @@ typedef NS_ENUM(NSInteger, EaseBlankPageType)
4445
EaseBlankPageTypeProject_WATCHED,
4546
EaseBlankPageTypeProject_STARED,
4647
EaseBlankPageTypeProject_SEARCH,
48+
EaseBlankPageTypeTeam,
49+
EaseBlankPageTypeFile,
50+
EaseBlankPageTypeMessageList,
4751
};
4852

4953
typedef NS_ENUM(NSInteger, BadgePositionType) {
@@ -119,8 +123,8 @@ typedef NS_ENUM(NSInteger, BadgePositionType) {
119123

120124
@interface EaseBlankPageView : UIView
121125
@property (strong, nonatomic) UIImageView *monkeyView;
122-
@property (strong, nonatomic) UILabel *tipLabel;
123-
@property (strong, nonatomic) UIButton *reloadButton;
126+
@property (strong, nonatomic) UILabel *tipLabel, *titleLabel;
127+
@property (strong, nonatomic) UIButton *reloadButton, *actionButton;
124128
@property (assign, nonatomic) EaseBlankPageType curType;
125129
@property (copy, nonatomic) void(^reloadButtonBlock)(id sender);
126130
@property (copy, nonatomic) void(^loadAndShowStatusBlock)();

0 commit comments

Comments
 (0)