| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -465,6 +465,11 @@ | |||
| 465 | 465 | 4EAECBC61C44CB860096CA74 /* member_cell_edit_type@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4EAECBC01C44CB860096CA74 /* member_cell_edit_type@2x.png */; }; | |
| 466 | 466 | 4EAECBC71C44CB860096CA74 /* member_cell_edit_type@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4EAECBC11C44CB860096CA74 /* member_cell_edit_type@3x.png */; }; | |
| 467 | 467 | 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 */; }; | ||
| 468 | 473 | 4EB5A9421BF1DB4600C23AC3 /* libSocialSinaSSO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4EB5A9341BF1DB4600C23AC3 /* libSocialSinaSSO.a */; }; | |
| 469 | 474 | 4EB5A9431BF1DB4600C23AC3 /* libWeiboSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4EB5A9351BF1DB4600C23AC3 /* libWeiboSDK.a */; }; | |
| 470 | 475 | 4EB5A9441BF1DB4600C23AC3 /* WeiboSDK.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 4EB5A93F1BF1DB4600C23AC3 /* WeiboSDK.bundle */; }; | |
@@ -1741,6 +1746,12 @@ | |||
| 1741 | 1746 | 4EAECBC11C44CB860096CA74 /* member_cell_edit_type@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "member_cell_edit_type@3x.png"; sourceTree = "<group>"; }; | |
| 1742 | 1747 | 4EB0C1FE1A807ED00042FC4F /* NSURL+Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSURL+Common.h"; sourceTree = "<group>"; }; | |
| 1743 | 1748 | 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>"; }; | ||
| 1744 | 1755 | 4EB5A9341BF1DB4600C23AC3 /* libSocialSinaSSO.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libSocialSinaSSO.a; sourceTree = "<group>"; }; | |
| 1745 | 1756 | 4EB5A9351BF1DB4600C23AC3 /* libWeiboSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libWeiboSDK.a; sourceTree = "<group>"; }; | |
| 1746 | 1757 | 4EB5A9361BF1DB4600C23AC3 /* UMSocialSinaSSOHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UMSocialSinaSSOHandler.h; sourceTree = "<group>"; }; | |
@@ -3487,6 +3498,17 @@ | |||
| 3487 | 3498 | path = member_cell_edit; | |
| 3488 | 3499 | sourceTree = "<group>"; | |
| 3489 | 3500 | }; | |
| 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 | + }; | ||
| 3490 | 3512 | 4EB5A9331BF1DB4600C23AC3 /* SinaSSO */ = { | |
| 3491 | 3513 | isa = PBXGroup; | |
| 3492 | 3514 | children = ( | |
@@ -4318,6 +4340,8 @@ | |||
| 4318 | 4340 | 8EA6CF2C19E240C40076D59C /* RegisterViewController.m */, | |
| 4319 | 4341 | 4E5C06E91AC4009100F427C5 /* CannotLoginViewController.h */, | |
| 4320 | 4342 | 4E5C06EA1AC4009100F427C5 /* CannotLoginViewController.m */, | |
| 4343 | + 4EB52F131C7599FC00B5EBEA /* ActivateViewController.h */, | ||
| 4344 | + 4EB52F141C7599FC00B5EBEA /* ActivateViewController.m */, | ||
| 4321 | 4345 | 4E5C06EC1AC4405300F427C5 /* PasswordViewController.h */, | |
| 4322 | 4346 | 4E5C06ED1AC4405300F427C5 /* PasswordViewController.m */, | |
| 4323 | 4347 | ); | |
@@ -4350,6 +4374,7 @@ | |||
| 4350 | 4374 | 8EA6CF5D19E240C40076D59C /* Images */ = { | |
| 4351 | 4375 | isa = PBXGroup; | |
| 4352 | 4376 | children = ( | |
| 4377 | + 4EB52F0A1C74691B00B5EBEA /* password */, | ||
| 4353 | 4378 | 4EAECBBB1C44CB860096CA74 /* member_cell_edit */, | |
| 4354 | 4379 | 4E2F6A651C43CA4B00A25502 /* member_type */, | |
| 4355 | 4380 | 927AFF451BFF6DAD00AAE593 /* shop */, | |
@@ -5327,6 +5352,7 @@ | |||
| 5327 | 5352 | 4E2BF3CF1B96CDF800A5A0A8 /* share_btn_coding@2x.png in Resources */, | |
| 5328 | 5353 | 8EA6D15019E240C40076D59C /* commentOrLikeBeginImg@2x.png in Resources */, | |
| 5329 | 5354 | 8EA6D15E19E240C40076D59C /* login_suffix@2x.png in Resources */, | |
| 5355 | + 4EB52F101C74691B00B5EBEA /* password_look@3x.png in Resources */, | ||
| 5330 | 5356 | 8E97CE721A0B8C6C006F9AD7 /* emotion_list.plist in Resources */, | |
| 5331 | 5357 | 4EC461B21B39360F00D08970 /* file_changeType_ADD@2x.png in Resources */, | |
| 5332 | 5358 | 4E4D6ACC1B2571B100FD2E49 /* git_icon_watched@2x.png in Resources */, | |
@@ -5451,6 +5477,7 @@ | |||
| 5451 | 5477 | 4E996C041ABBF56A00C704F1 /* n_btn_followed_yes@2x.png in Resources */, | |
| 5452 | 5478 | 4EAE06901B784E9200179F4B /* store_icon@2x.png in Resources */, | |
| 5453 | 5479 | 4EF818161B049C89005F974B /* addPictureBgImage@2x.png in Resources */, | |
| 5480 | + 4EB52F0F1C74691B00B5EBEA /* password_look@2x.png in Resources */, | ||
| 5454 | 5481 | 4ED673281A8E12F900DF2D1A /* SVWebViewControllerActivityReport-iPad@2x.png in Resources */, | |
| 5455 | 5482 | 4E07D30E1A4A9F45009EDDF2 /* btn_file_reDo@2x.png in Resources */, | |
| 5456 | 5483 | D0C447C41C02DB5400DC1C4B /* pop_Tweet@2x.png in Resources */, | |
@@ -5537,6 +5564,7 @@ | |||
| 5537 | 5564 | 8B35164F1B6CE9460049BC45 /* icon_arrow_searchHistory@2x.png in Resources */, | |
| 5538 | 5565 | 8EA6D16819E240C40076D59C /* nav_project_member@2x.png in Resources */, | |
| 5539 | 5566 | 4E9113A91A1CB19900AC9431 /* icon_file_state_download@2x.png in Resources */, | |
| 5567 | + 4EB52F121C74691B00B5EBEA /* password_unlook@3x.png in Resources */, | ||
| 5540 | 5568 | 4E9113AB1A1CB19900AC9431 /* icon_file_state_look@2x.png in Resources */, | |
| 5541 | 5569 | D0C447CD1C02DB6700DC1C4B /* pop_Message@3x.png in Resources */, | |
| 5542 | 5570 | D0C447FB1C02DCA200DC1C4B /* settingBtn_Nav@2x.png in Resources */, | |
@@ -5782,6 +5810,7 @@ | |||
| 5782 | 5810 | 4E217F131A70EDC700F6DF88 /* SVWebViewControllerActivitySafari-iPad.png in Resources */, | |
| 5783 | 5811 | 8EF6435019FF4E1600F7EEB0 /* comment_count_top_line@2x.png in Resources */, | |
| 5784 | 5812 | 7E335D9E1B6F5E94003D0F3D /* keyboard_voice_record@2x.png in Resources */, | |
| 5813 | + 4EB52F111C74691B00B5EBEA /* password_unlook@2x.png in Resources */, | ||
| 5785 | 5814 | 4E2DB3481BA6AEB4002F27C4 /* coding_emoji_gif_03@2x.png in Resources */, | |
| 5786 | 5815 | 4E6B07141BA3D9B5007D6027 /* intro_page1_ip6+@3x.png in Resources */, | |
| 5787 | 5816 | 8EA6D18219E240C40076D59C /* splitlineImg@2x.png in Resources */, | |
@@ -6204,6 +6233,7 @@ | |||
| 6204 | 6233 | 3A3878401AE295970078D5DE /* ResetLabelCell.m in Sources */, | |
| 6205 | 6234 | 4EA679201A15AB9F001A0324 /* FileListViewController.m in Sources */, | |
| 6206 | 6235 | 8EA6D14119E240C40076D59C /* ValueListViewController.m in Sources */, | |
| 6236 | + 4EB52F151C7599FC00B5EBEA /* ActivateViewController.m in Sources */, | ||
| 6207 | 6237 | 4ECE8ADD1A3943E80021E29C /* NSObject+ObjectMap.m in Sources */, | |
| 6208 | 6238 | 4E8765661A22E5B40090CFB9 /* SWCellScrollView.m in Sources */, | |
| 6209 | 6239 | 8E1C3DEB19E7D58A00EF3032 /* ActionSheetCustomPicker.m in Sources */, | |
| Original file line number | Diff line number | Diff 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 | ||
| Original file line number | Diff line number | Diff 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 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,7 +15,8 @@ typedef NS_ENUM(NSInteger, CannotLoginMethodType) { | |||
| 15 | 15 | }; | |
| 16 | 16 | ||
| 17 | 17 | @interface CannotLoginViewController : BaseViewController | |
| 18 | + + (instancetype)vcWithMethodType:(CannotLoginMethodType)methodType stepIndex:(NSUInteger)stepIndex userStr:(NSString *)userStr; | ||
| 18 | 19 | ||
| 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; | ||
| 20 | 21 | ||
| 21 | 22 | @end | |
| Back | FazBrowse Home | New Git URL |
0 commit comments