Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b318bfe

Browse files
登录注册改改改
1 parent 1bedeed commit b318bfe

19 files changed

+467
-496
lines changed

‎Coding_iOS.xcodeproj/project.pbxproj‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,11 @@
465465
4EAECBC61C44CB860096CA74 /* member_cell_edit_type@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4EAECBC01C44CB860096CA74 /* member_cell_edit_type@2x.png */; };
466466
4EAECBC71C44CB860096CA74 /* member_cell_edit_type@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4EAECBC11C44CB860096CA74 /* member_cell_edit_type@3x.png */; };
467467
4EB0C2001A807ED00042FC4F /* NSURL+Common.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EB0C1FF1A807ED00042FC4F /* NSURL+Common.m */; };
468+
4EB52F0F1C74691B00B5EBEA /* password_look@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4EB52F0B1C74691B00B5EBEA /* password_look@2x.png */; };
469+
4EB52F101C74691B00B5EBEA /* password_look@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4EB52F0C1C74691B00B5EBEA /* password_look@3x.png */; };
470+
4EB52F111C74691B00B5EBEA /* password_unlook@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4EB52F0D1C74691B00B5EBEA /* password_unlook@2x.png */; };
471+
4EB52F121C74691B00B5EBEA /* password_unlook@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4EB52F0E1C74691B00B5EBEA /* password_unlook@3x.png */; };
472+
4EB52F151C7599FC00B5EBEA /* ActivateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EB52F141C7599FC00B5EBEA /* ActivateViewController.m */; };
468473
4EB5A9421BF1DB4600C23AC3 /* libSocialSinaSSO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4EB5A9341BF1DB4600C23AC3 /* libSocialSinaSSO.a */; };
469474
4EB5A9431BF1DB4600C23AC3 /* libWeiboSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4EB5A9351BF1DB4600C23AC3 /* libWeiboSDK.a */; };
470475
4EB5A9441BF1DB4600C23AC3 /* WeiboSDK.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 4EB5A93F1BF1DB4600C23AC3 /* WeiboSDK.bundle */; };
@@ -1741,6 +1746,12 @@
17411746
4EAECBC11C44CB860096CA74 /* member_cell_edit_type@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "member_cell_edit_type@3x.png"; sourceTree = "<group>"; };
17421747
4EB0C1FE1A807ED00042FC4F /* NSURL+Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSURL+Common.h"; sourceTree = "<group>"; };
17431748
4EB0C1FF1A807ED00042FC4F /* NSURL+Common.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSURL+Common.m"; sourceTree = "<group>"; };
1749+
4EB52F0B1C74691B00B5EBEA /* password_look@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "password_look@2x.png"; sourceTree = "<group>"; };
1750+
4EB52F0C1C74691B00B5EBEA /* password_look@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "password_look@3x.png"; sourceTree = "<group>"; };
1751+
4EB52F0D1C74691B00B5EBEA /* password_unlook@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "password_unlook@2x.png"; sourceTree = "<group>"; };
1752+
4EB52F0E1C74691B00B5EBEA /* password_unlook@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "password_unlook@3x.png"; sourceTree = "<group>"; };
1753+
4EB52F131C7599FC00B5EBEA /* ActivateViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ActivateViewController.h; sourceTree = "<group>"; };
1754+
4EB52F141C7599FC00B5EBEA /* ActivateViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ActivateViewController.m; sourceTree = "<group>"; };
17441755
4EB5A9341BF1DB4600C23AC3 /* libSocialSinaSSO.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libSocialSinaSSO.a; sourceTree = "<group>"; };
17451756
4EB5A9351BF1DB4600C23AC3 /* libWeiboSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libWeiboSDK.a; sourceTree = "<group>"; };
17461757
4EB5A9361BF1DB4600C23AC3 /* UMSocialSinaSSOHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UMSocialSinaSSOHandler.h; sourceTree = "<group>"; };
@@ -3487,6 +3498,17 @@
34873498
path = member_cell_edit;
34883499
sourceTree = "<group>";
34893500
};
3501+
4EB52F0A1C74691B00B5EBEA /* password */ = {
3502+
isa = PBXGroup;
3503+
children = (
3504+
4EB52F0B1C74691B00B5EBEA /* password_look@2x.png */,
3505+
4EB52F0C1C74691B00B5EBEA /* password_look@3x.png */,
3506+
4EB52F0D1C74691B00B5EBEA /* password_unlook@2x.png */,
3507+
4EB52F0E1C74691B00B5EBEA /* password_unlook@3x.png */,
3508+
);
3509+
path = password;
3510+
sourceTree = "<group>";
3511+
};
34903512
4EB5A9331BF1DB4600C23AC3 /* SinaSSO */ = {
34913513
isa = PBXGroup;
34923514
children = (
@@ -4318,6 +4340,8 @@
43184340
8EA6CF2C19E240C40076D59C /* RegisterViewController.m */,
43194341
4E5C06E91AC4009100F427C5 /* CannotLoginViewController.h */,
43204342
4E5C06EA1AC4009100F427C5 /* CannotLoginViewController.m */,
4343+
4EB52F131C7599FC00B5EBEA /* ActivateViewController.h */,
4344+
4EB52F141C7599FC00B5EBEA /* ActivateViewController.m */,
43214345
4E5C06EC1AC4405300F427C5 /* PasswordViewController.h */,
43224346
4E5C06ED1AC4405300F427C5 /* PasswordViewController.m */,
43234347
);
@@ -4350,6 +4374,7 @@
43504374
8EA6CF5D19E240C40076D59C /* Images */ = {
43514375
isa = PBXGroup;
43524376
children = (
4377+
4EB52F0A1C74691B00B5EBEA /* password */,
43534378
4EAECBBB1C44CB860096CA74 /* member_cell_edit */,
43544379
4E2F6A651C43CA4B00A25502 /* member_type */,
43554380
927AFF451BFF6DAD00AAE593 /* shop */,
@@ -5327,6 +5352,7 @@
53275352
4E2BF3CF1B96CDF800A5A0A8 /* share_btn_coding@2x.png in Resources */,
53285353
8EA6D15019E240C40076D59C /* commentOrLikeBeginImg@2x.png in Resources */,
53295354
8EA6D15E19E240C40076D59C /* login_suffix@2x.png in Resources */,
5355+
4EB52F101C74691B00B5EBEA /* password_look@3x.png in Resources */,
53305356
8E97CE721A0B8C6C006F9AD7 /* emotion_list.plist in Resources */,
53315357
4EC461B21B39360F00D08970 /* file_changeType_ADD@2x.png in Resources */,
53325358
4E4D6ACC1B2571B100FD2E49 /* git_icon_watched@2x.png in Resources */,
@@ -5451,6 +5477,7 @@
54515477
4E996C041ABBF56A00C704F1 /* n_btn_followed_yes@2x.png in Resources */,
54525478
4EAE06901B784E9200179F4B /* store_icon@2x.png in Resources */,
54535479
4EF818161B049C89005F974B /* addPictureBgImage@2x.png in Resources */,
5480+
4EB52F0F1C74691B00B5EBEA /* password_look@2x.png in Resources */,
54545481
4ED673281A8E12F900DF2D1A /* SVWebViewControllerActivityReport-iPad@2x.png in Resources */,
54555482
4E07D30E1A4A9F45009EDDF2 /* btn_file_reDo@2x.png in Resources */,
54565483
D0C447C41C02DB5400DC1C4B /* pop_Tweet@2x.png in Resources */,
@@ -5537,6 +5564,7 @@
55375564
8B35164F1B6CE9460049BC45 /* icon_arrow_searchHistory@2x.png in Resources */,
55385565
8EA6D16819E240C40076D59C /* nav_project_member@2x.png in Resources */,
55395566
4E9113A91A1CB19900AC9431 /* icon_file_state_download@2x.png in Resources */,
5567+
4EB52F121C74691B00B5EBEA /* password_unlook@3x.png in Resources */,
55405568
4E9113AB1A1CB19900AC9431 /* icon_file_state_look@2x.png in Resources */,
55415569
D0C447CD1C02DB6700DC1C4B /* pop_Message@3x.png in Resources */,
55425570
D0C447FB1C02DCA200DC1C4B /* settingBtn_Nav@2x.png in Resources */,
@@ -5782,6 +5810,7 @@
57825810
4E217F131A70EDC700F6DF88 /* SVWebViewControllerActivitySafari-iPad.png in Resources */,
57835811
8EF6435019FF4E1600F7EEB0 /* comment_count_top_line@2x.png in Resources */,
57845812
7E335D9E1B6F5E94003D0F3D /* keyboard_voice_record@2x.png in Resources */,
5813+
4EB52F111C74691B00B5EBEA /* password_unlook@2x.png in Resources */,
57855814
4E2DB3481BA6AEB4002F27C4 /* coding_emoji_gif_03@2x.png in Resources */,
57865815
4E6B07141BA3D9B5007D6027 /* intro_page1_ip6+@3x.png in Resources */,
57875816
8EA6D18219E240C40076D59C /* splitlineImg@2x.png in Resources */,
@@ -6204,6 +6233,7 @@
62046233
3A3878401AE295970078D5DE /* ResetLabelCell.m in Sources */,
62056234
4EA679201A15AB9F001A0324 /* FileListViewController.m in Sources */,
62066235
8EA6D14119E240C40076D59C /* ValueListViewController.m in Sources */,
6236+
4EB52F151C7599FC00B5EBEA /* ActivateViewController.m in Sources */,
62076237
4ECE8ADD1A3943E80021E29C /* NSObject+ObjectMap.m in Sources */,
62086238
4E8765661A22E5B40090CFB9 /* SWCellScrollView.m in Sources */,
62096239
8E1C3DEB19E7D58A00EF3032 /* ActionSheetCustomPicker.m in Sources */,
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//
2+
// ActivateViewController.h
3+
// Coding_iOS
4+
//
5+
// Created by Ease on 16/2/18.
6+
// Copyright © 2016年 Coding. All rights reserved.
7+
//
8+
9+
#import "BaseViewController.h"
10+
11+
@interface ActivateViewController : BaseViewController
12+
13+
@end
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
//
2+
// ActivateViewController.m
3+
// Coding_iOS
4+
//
5+
// Created by Ease on 16/2/18.
6+
// Copyright © 2016年 Coding. All rights reserved.
7+
//
8+
9+
#import "ActivateViewController.h"
10+
#import "Input_OnlyText_Cell.h"
11+
#import "TPKeyboardAvoidingTableView.h"
12+
#import "Coding_NetAPIManager.h"
13+
#import "AppDelegate.h"
14+
15+
@interface ActivateViewController ()<UITableViewDataSource, UITableViewDelegate>
16+
@property (strong, nonatomic) TPKeyboardAvoidingTableView *myTableView;
17+
@property (strong, nonatomic) UIButton *footerBtn;
18+
@property (strong, nonatomic) NSString *global_key;
19+
@end
20+
21+
@implementation ActivateViewController
22+
23+
- (void)viewDidLoad {
24+
[super viewDidLoad];
25+
// Do any additional setup after loading the view.
26+
self.title = @"设置用户名";
27+
// 添加myTableView
28+
_myTableView = ({
29+
TPKeyboardAvoidingTableView *tableView = [[TPKeyboardAvoidingTableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
30+
[tableView registerClass:[Input_OnlyText_Cell class] forCellReuseIdentifier:kCellIdentifier_Input_OnlyText_Cell_Text];
31+
tableView.backgroundColor = kColorTableSectionBg;
32+
tableView.dataSource = self;
33+
tableView.delegate = self;
34+
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
35+
[self.view addSubview:tableView];
36+
[tableView mas_makeConstraints:^(MASConstraintMaker *make) {
37+
make.edges.equalTo(self.view);
38+
}];
39+
tableView;
40+
});
41+
self.myTableView.tableHeaderView = [self customHeaderView];
42+
self.myTableView.tableFooterView=[self customFooterView];
43+
}
44+
- (void)viewWillAppear:(BOOL)animated{
45+
[super viewWillAppear:animated];
46+
[self.navigationController setNavigationBarHidden:NO animated:YES];
47+
}
48+
49+
- (UIView *)customHeaderView{
50+
UIView *headerV = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreen_Width, 60)];
51+
headerV.backgroundColor = [UIColor clearColor];
52+
UILabel *headerLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, kScreen_Width, 50)];
53+
headerLabel.backgroundColor = [UIColor clearColor];
54+
headerLabel.font = [UIFont boldSystemFontOfSize:12];
55+
headerLabel.textColor = [UIColor colorWithHexString:@"0x999999"];
56+
headerLabel.numberOfLines = 0;
57+
headerLabel.textAlignment = NSTextAlignmentCenter;
58+
headerLabel.text = @"您还未设置过用户名(个性后缀)\n设置后才能正常登录!";
59+
[headerLabel setCenter:headerV.center];
60+
[headerV addSubview:headerLabel];
61+
return headerV;
62+
}
63+
- (UIView *)customFooterView{
64+
UIView *footerV = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreen_Width, 150)];
65+
//button
66+
_footerBtn = [UIButton buttonWithStyle:StrapSuccessStyle andTitle:@"马上设置" andFrame:CGRectMake(kLoginPaddingLeftWidth, 20, kScreen_Width-kLoginPaddingLeftWidth*2, 45) target:self action:@selector(sendActivate)];
67+
[footerV addSubview:_footerBtn];
68+
RAC(self, footerBtn.enabled) = [RACSignal combineLatest:@[RACObserve(self, global_key)] reduce:^id(NSString *global_key){
69+
return @(global_key.length > 0);
70+
}];
71+
return footerV;
72+
}
73+
74+
- (void)sendActivate{
75+
[self.footerBtn startQueryAnimate];
76+
[[Coding_NetAPIManager sharedManager] request_ActivateBySetGlobal_key:_global_key block:^(id data, NSError *error) {
77+
[self.footerBtn stopQueryAnimate];
78+
if (data) {
79+
[Login setPreUserEmail:self.global_key];//记住登录账号
80+
[((AppDelegate *)[UIApplication sharedApplication].delegate) setupTabViewController];
81+
}
82+
}];
83+
}
84+
#pragma matk Table
85+
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
86+
return 1;
87+
}
88+
89+
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
90+
Input_OnlyText_Cell *cell = [tableView dequeueReusableCellWithIdentifier:kCellIdentifier_Input_OnlyText_Cell_Text forIndexPath:indexPath];
91+
__weak typeof(self) weakSelf = self;
92+
[cell setPlaceholder:@" 用户名(个性后缀)" value:self.global_key];
93+
cell.textValueChangedBlock = ^(NSString *valueStr){
94+
weakSelf.global_key = valueStr;
95+
};
96+
[tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:kLoginPaddingLeftWidth];
97+
return cell;
98+
}
99+
100+
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
101+
return 44.0;
102+
}
103+
@end

‎Coding_iOS/Controllers/Login/CannotLoginViewController.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ typedef NS_ENUM(NSInteger, CannotLoginMethodType) {
1515
};
1616

1717
@interface CannotLoginViewController : BaseViewController
18+
+ (instancetype)vcWithMethodType:(CannotLoginMethodType)methodType stepIndex:(NSUInteger)stepIndex userStr:(NSString *)userStr;
1819

19-
+ (instancetype)vcWithPurposeType:(PurposeType)purposeType methodType:(CannotLoginMethodType)methodType stepIndex:(NSUInteger)stepIndex userStr:(NSString *)userStr;
20+
//+ (instancetype)vcWithPurposeType:(PurposeType)purposeType methodType:(CannotLoginMethodType)methodType stepIndex:(NSUInteger)stepIndex userStr:(NSString *)userStr;
2021

2122
@end

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /