Skip to content

Commit f188e49

Browse files
committed
调整界面
1 parent 24b2488 commit f188e49

17 files changed

Lines changed: 124 additions & 84 deletions

Coding_iOS.xcodeproj/project.pbxproj

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,8 @@
3131
4E1A22851AB172C400CFC14F /* ProjectItemsCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E1A22841AB172C400CFC14F /* ProjectItemsCell.m */; };
3232
4E1A22881AB1731600CFC14F /* ProjectDescriptionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E1A22871AB1731600CFC14F /* ProjectDescriptionCell.m */; };
3333
4E1A228B1AB1844F00CFC14F /* EaseGitButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E1A228A1AB1844F00CFC14F /* EaseGitButton.m */; };
34-
4E1A22901AB19D1F00CFC14F /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 4E1A228D1AB19D1F00CFC14F /* [email protected] */; };
35-
4E1A22911AB19D1F00CFC14F /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 4E1A228E1AB19D1F00CFC14F /* [email protected] */; };
3634
4E1A22921AB19D1F00CFC14F /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 4E1A228F1AB19D1F00CFC14F /* [email protected] */; };
3735
4E1A22941AB19D4500CFC14F /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 4E1A22931AB19D4500CFC14F /* [email protected] */; };
38-
4E1A22961AB19D5800CFC14F /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 4E1A22951AB19D5800CFC14F /* [email protected] */; };
3936
4E217F0C1A70EDC700F6DF88 /* SVModalWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E217EF91A70EDC700F6DF88 /* SVModalWebViewController.m */; };
4037
4E217F0D1A70EDC700F6DF88 /* SVWebViewController.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 4E217EFA1A70EDC700F6DF88 /* SVWebViewController.bundle */; };
4138
4E217F0E1A70EDC700F6DF88 /* SVWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E217EFC1A70EDC700F6DF88 /* SVWebViewController.m */; };
@@ -88,7 +85,6 @@
8885
4E6D718A1A75F00E005AD988 /* YLImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E6D71881A75F00E005AD988 /* YLImageView.m */; };
8986
4E6D718D1A762879005AD988 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 4E6D718B1A762879005AD988 /* [email protected] */; };
9087
4E6D718E1A762879005AD988 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 4E6D718C1A762879005AD988 /* [email protected] */; };
91-
4E6FFAF61AB2BF4100F27B3F /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 4E6FFAF51AB2BF4100F27B3F /* [email protected] */; };
9288
4E6FFB311AB3176900F27B3F /* ProjectReadMeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E6FFB301AB3176900F27B3F /* ProjectReadMeCell.m */; };
9389
4E743E691A8866E300DADDE5 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 4E743E671A8866E300DADDE5 /* [email protected] */; };
9490
4E743E6A1A8866E300DADDE5 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 4E743E681A8866E300DADDE5 /* [email protected] */; };
@@ -169,6 +165,9 @@
169165
4EACB4461A2C60110097ABB3 /* ProjectActivities.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EACB4451A2C60110097ABB3 /* ProjectActivities.m */; };
170166
4EB0C2001A807ED00042FC4F /* NSURL+Common.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EB0C1FF1A807ED00042FC4F /* NSURL+Common.m */; };
171167
4EB0C2021A80B8F20042FC4F /* service_terms.html in Resources */ = {isa = PBXBuildFile; fileRef = 4EB0C2011A80B8F20042FC4F /* service_terms.html */; };
168+
4EB845331AB83C3B0030DC69 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 4EB845301AB83C3B0030DC69 /* [email protected] */; };
169+
4EB845341AB83C3B0030DC69 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 4EB845311AB83C3B0030DC69 /* [email protected] */; };
170+
4EB845351AB83C3B0030DC69 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 4EB845321AB83C3B0030DC69 /* [email protected] */; };
172171
4EBB624C1A6F526C0045DAEF /* NJKWebViewProgress.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EBB62491A6F526C0045DAEF /* NJKWebViewProgress.m */; };
173172
4EBB624D1A6F526C0045DAEF /* NJKWebViewProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EBB624B1A6F526C0045DAEF /* NJKWebViewProgressView.m */; };
174173
4EBD0C661A1F2011004B4284 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 4EBD0C651A1F2011004B4284 /* [email protected] */; };
@@ -591,11 +590,8 @@
591590
4E1A22871AB1731600CFC14F /* ProjectDescriptionCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProjectDescriptionCell.m; sourceTree = "<group>"; };
592591
4E1A22891AB1844F00CFC14F /* EaseGitButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EaseGitButton.h; sourceTree = "<group>"; };
593592
4E1A228A1AB1844F00CFC14F /* EaseGitButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EaseGitButton.m; sourceTree = "<group>"; };
594-
4E1A228D1AB19D1F00CFC14F /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
595-
4E1A228E1AB19D1F00CFC14F /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
596593
4E1A228F1AB19D1F00CFC14F /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
597594
4E1A22931AB19D4500CFC14F /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
598-
4E1A22951AB19D5800CFC14F /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
599595
4E217EF81A70EDC700F6DF88 /* SVModalWebViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVModalWebViewController.h; sourceTree = "<group>"; };
600596
4E217EF91A70EDC700F6DF88 /* SVModalWebViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVModalWebViewController.m; sourceTree = "<group>"; };
601597
4E217EFA1A70EDC700F6DF88 /* SVWebViewController.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = SVWebViewController.bundle; sourceTree = "<group>"; };
@@ -685,7 +681,6 @@
685681
4E6D71881A75F00E005AD988 /* YLImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YLImageView.m; sourceTree = "<group>"; };
686682
4E6D718B1A762879005AD988 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
687683
4E6D718C1A762879005AD988 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
688-
4E6FFAF51AB2BF4100F27B3F /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
689684
4E6FFB2F1AB3176900F27B3F /* ProjectReadMeCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProjectReadMeCell.h; sourceTree = "<group>"; };
690685
4E6FFB301AB3176900F27B3F /* ProjectReadMeCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProjectReadMeCell.m; sourceTree = "<group>"; };
691686
4E743E671A8866E300DADDE5 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
@@ -805,6 +800,9 @@
805800
4EB0C1FE1A807ED00042FC4F /* NSURL+Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSURL+Common.h"; sourceTree = "<group>"; };
806801
4EB0C1FF1A807ED00042FC4F /* NSURL+Common.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSURL+Common.m"; sourceTree = "<group>"; };
807802
4EB0C2011A80B8F20042FC4F /* service_terms.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = service_terms.html; sourceTree = "<group>"; };
803+
4EB845301AB83C3B0030DC69 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
804+
4EB845311AB83C3B0030DC69 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
805+
4EB845321AB83C3B0030DC69 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
808806
4EBB62481A6F526C0045DAEF /* NJKWebViewProgress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NJKWebViewProgress.h; sourceTree = "<group>"; };
809807
4EBB62491A6F526C0045DAEF /* NJKWebViewProgress.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NJKWebViewProgress.m; sourceTree = "<group>"; };
810808
4EBB624A1A6F526C0045DAEF /* NJKWebViewProgressView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NJKWebViewProgressView.h; sourceTree = "<group>"; };
@@ -1437,12 +1435,11 @@
14371435
4E1A228C1AB19D1F00CFC14F /* git_btn_icons */ = {
14381436
isa = PBXGroup;
14391437
children = (
1440-
4E1A228E1AB19D1F00CFC14F /* [email protected] */,
14411438
4E1A228F1AB19D1F00CFC14F /* [email protected] */,
1442-
4E6FFAF51AB2BF4100F27B3F /* [email protected] */,
14431439
4E1A22931AB19D4500CFC14F /* [email protected] */,
1444-
4E1A22951AB19D5800CFC14F /* [email protected] */,
1445-
4E1A228D1AB19D1F00CFC14F /* [email protected] */,
1440+
4EB845301AB83C3B0030DC69 /* [email protected] */,
1441+
4EB845311AB83C3B0030DC69 /* [email protected] */,
1442+
4EB845321AB83C3B0030DC69 /* [email protected] */,
14461443
);
14471444
path = git_btn_icons;
14481445
sourceTree = "<group>";
@@ -2970,9 +2967,7 @@
29702967
8E97CE661A0A3424006F9AD7 /* [email protected] in Resources */,
29712968
4E6D718D1A762879005AD988 /* [email protected] in Resources */,
29722969
8E8F7B2E19EF6306006BA8BD /* [email protected] in Resources */,
2973-
4E1A22901AB19D1F00CFC14F /* [email protected] in Resources */,
29742970
8E8F7B3319EF6306006BA8BD /* [email protected] in Resources */,
2975-
4E1A22911AB19D1F00CFC14F /* [email protected] in Resources */,
29762971
4E9113AA1A1CB19900AC9431 /* [email protected] in Resources */,
29772972
8E64ED8319ED0CE3006E99DA /* QBImagePickerController.strings in Resources */,
29782973
8E97CE671A0A3424006F9AD7 /* [email protected] in Resources */,
@@ -3005,7 +3000,6 @@
30053000
8E8F7B3219EF6306006BA8BD /* [email protected] in Resources */,
30063001
8E97CEBB1A0C7E26006F9AD7 /* [email protected] in Resources */,
30073002
8EA6D19F19E240C40076D59C /* [email protected] in Resources */,
3008-
4E1A22961AB19D5800CFC14F /* [email protected] in Resources */,
30093003
4ED673281A8E12F900DF2D1A /* [email protected] in Resources */,
30103004
4E07D30E1A4A9F45009EDDF2 /* [email protected] in Resources */,
30113005
8EA6D15F19E240C40076D59C /* [email protected] in Resources */,
@@ -3019,7 +3013,6 @@
30193013
8EA6D19A19E240C40076D59C /* [email protected] in Resources */,
30203014
8E8F7B3019EF6306006BA8BD /* [email protected] in Resources */,
30213015
4E07D30D1A4A9F45009EDDF2 /* [email protected] in Resources */,
3022-
4E6FFAF61AB2BF4100F27B3F /* [email protected] in Resources */,
30233016
8E97CEA01A0C7E26006F9AD7 /* [email protected] in Resources */,
30243017
4E76D4E51A5A90CA0094A35E /* [email protected] in Resources */,
30253018
4E07D30A1A4A9ACB009EDDF2 /* [email protected] in Resources */,
@@ -3058,6 +3051,7 @@
30583051
4E96E7DD1A1B537E0037C098 /* [email protected] in Resources */,
30593052
8E97CEB41A0C7E26006F9AD7 /* [email protected] in Resources */,
30603053
8EA6D18A19E240C40076D59C /* [email protected] in Resources */,
3054+
4EB845341AB83C3B0030DC69 /* [email protected] in Resources */,
30613055
8E97CE641A0A3424006F9AD7 /* [email protected] in Resources */,
30623056
4E03ACA11A5CEB41002B000B /* [email protected] in Resources */,
30633057
4E03ACA01A5CEB41002B000B /* [email protected] in Resources */,
@@ -3159,6 +3153,8 @@
31593153
8E97CEAE1A0C7E26006F9AD7 /* [email protected] in Resources */,
31603154
8EA6D19D19E240C40076D59C /* [email protected] in Resources */,
31613155
8E97CEAA1A0C7E26006F9AD7 /* [email protected] in Resources */,
3156+
4EB845331AB83C3B0030DC69 /* [email protected] in Resources */,
3157+
4EB845351AB83C3B0030DC69 /* [email protected] in Resources */,
31623158
4E96E7E31A1B537E0037C098 /* [email protected] in Resources */,
31633159
4EA679061A130C24001A0324 /* [email protected] in Resources */,
31643160
8EA6D18919E240C40076D59C /* [email protected] in Resources */,

Coding_iOS/Coding_iOS-Prefix.pch

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@
106106
#define kPlaceholderCodingSquareWidth(_width_) [UIImage imageNamed:[NSString stringWithFormat:@"placeholder_coding_square_%.0f", _width_]]
107107
#define kPlaceholderCodingSquareView(_view_) [UIImage imageNamed:[NSString stringWithFormat:@"placeholder_coding_square_%.0f", CGRectGetWidth(_view_.frame)]]
108108

109+
#define kScaleFrom_iPhone5_Desgin(_X_) (_X_ * (kScreen_Width/320))
110+
109111
#define kUnReadKey_messages @"messages"
110112
#define kUnReadKey_notifications @"notifications"
111113
#define kUnReadKey_project_update_count @"project_update_count"

Coding_iOS/Controllers/NProjectViewController/NProjectViewController.m

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSIntege
166166
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
167167
if (_myProject.is_public && !_myProject.is_public.boolValue
168168
&& section > 0) {
169-
return section == 1? 75: 24;
169+
return section == 1? kScaleFrom_iPhone5_Desgin(60): kScaleFrom_iPhone5_Desgin(24);
170170
}else{
171171
return 0;
172172
}
@@ -177,16 +177,19 @@ - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger
177177
if (_myProject.is_public && !_myProject.is_public.boolValue
178178
&& section > 0) {
179179
ListGroupItem *item = [_myProActs.listGroups objectAtIndex:section -1];
180-
UIView *dateStrView = [tableView getHeaderViewWithStr:[item.date string_yyyy_MM_dd_EEE] color:[UIColor colorWithHexString:@"0xedefee"] andBlock:nil];
180+
UIView *dateStrView = [tableView getHeaderViewWithStr:[item.date string_yyyy_MM_dd_EEE] color:[UIColor colorWithHexString:@"0xeeeeee"] andBlock:nil];
181+
dateStrView.layer.masksToBounds = YES;
182+
dateStrView.layer.cornerRadius = 2.0;
183+
181184
headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreen_Width, [self tableView:tableView heightForHeaderInSection:section])];
182185
headerView.backgroundColor = self.view.backgroundColor;
183-
[dateStrView setFrame:CGRectMake(10,
186+
[dateStrView setFrame:CGRectMake(kPaddingLeftWidth,
184187
CGRectGetHeight(headerView.frame) - CGRectGetHeight(dateStrView.frame),
185-
kScreen_Width - 2* 10,
188+
kScreen_Width - 2* kPaddingLeftWidth,
186189
CGRectGetHeight(dateStrView.frame))];
187190
[headerView addSubview:dateStrView];
188191
if (section == 1) {
189-
UILabel *titleL = [[UILabel alloc] initWithFrame:CGRectMake(10, 15, 200, 20)];
192+
UILabel *titleL = [[UILabel alloc] initWithFrame:CGRectMake(kPaddingLeftWidth, kScaleFrom_iPhone5_Desgin(10), 200, 20)];
190193
titleL.font = [UIFont systemFontOfSize:15];
191194
titleL.textColor = [UIColor colorWithHexString:@"0x222222"];
192195
titleL.text = @"最近动态";
@@ -280,7 +283,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
280283
[weakSelf goToVCWithItem:clickedItem activity:proAct isContent:isContent inProject:weakSelf.myProject];
281284
};
282285
[tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:
283-
(row == item.location +item.length -1)? 0: 80 hasSectionLine:NO];
286+
(row == item.location +item.length -1)? 0: 85 hasSectionLine:NO];
284287
return cell;
285288
}
286289
}
@@ -370,14 +373,18 @@ - (void)gitButtonClicked:(NSInteger)index{
370373
break;
371374
default://Fork
372375
{
373-
[[Coding_NetAPIManager sharedManager] request_ForkProject:_myProject andBlock:^(id data, NSError *error) {
374-
[weakSelf.myTableView reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationNone];
375-
if (data) {
376-
NProjectViewController *vc = [[NProjectViewController alloc] init];
377-
vc.myProject = data;
378-
[weakSelf.navigationController pushViewController:vc animated:YES];
376+
[[UIActionSheet bk_actionSheetCustomWithTitle:@"fork将会将此项目复制到您的个人空间,确定要fork吗?" buttonTitles:@[@"确定"] destructiveTitle:nil cancelTitle:@"取消" andDidDismissBlock:^(UIActionSheet *sheet, NSInteger index) {
377+
if (index == 0) {
378+
[[Coding_NetAPIManager sharedManager] request_ForkProject:_myProject andBlock:^(id data, NSError *error) {
379+
[weakSelf.myTableView reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationNone];
380+
if (data) {
381+
NProjectViewController *vc = [[NProjectViewController alloc] init];
382+
vc.myProject = data;
383+
[weakSelf.navigationController pushViewController:vc animated:YES];
384+
}
385+
}];
379386
}
380-
}];
387+
}] showInView:self.view];
381388
}
382389
break;
383390
}
34 Bytes
Loading
-1.21 KB
Binary file not shown.
-1 Bytes
Loading
-3 Bytes
Loading

Coding_iOS/Util/Common/EaseGitButton.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ typedef enum {
1717
@property (strong, nonatomic) NSString *normalTitle, *checkedTitle, *normalIcon, *checkedIcon;
1818
@property (nonatomic, assign) NSInteger userNum;
1919
@property (assign, nonatomic) BOOL checked;
20+
@property (assign, nonatomic) EaseGitButtonType type;
2021

2122
- (id)initWithFrame:(CGRect)frame normalTitle:(NSString *)normalTitle checkedTitle:(NSString *)checkedTitle normalIcon:(NSString *)normalIcon checkedIcon:(NSString *)checkedIcon userNum:(NSInteger)userNum checked:(BOOL)checked;
2223
+ (EaseGitButton *)gitButtonWithFrame:(CGRect)frame type:(EaseGitButtonType)type;

0 commit comments

Comments
 (0)