123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- //
- // SKMineViewController+user.m
- // Overseas Watch
- //
- // Created by 刘振兴 on 2024/1/20.
- // Copyright © 2024 BaH Cy. All rights reserved.
- //
- #import "SKMineViewController+user.h"
- #import "SKMineViewCell.h"
- #import "SKWebViewViewController.h"
- #import "TestMasonryViewController.h"
- @implementation SKMineViewController (user)
- - (UITableViewCell *)userTableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- static NSString *cellID = @"MineCellID";
- SKMineViewCell *cell = (SKMineViewCell*)[self.mTableView dequeueReusableCellWithIdentifier:cellID forIndexPath:indexPath];
- if(cell == nil) {
- cell = [[SKMineViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellID];
- }
- NSString* imageName = [NSString stringWithFormat:@"%@_%ld", @"mine_list", (long)indexPath.row];
- NSString* titleName = [NSString stringWithFormat:@"%@.%ld", @"Mine.List", (long)indexPath.row];
- [cell.mImage setImage:[UIImage imageNamed:imageName]];
- cell.mTitle.text = NSLocalizedString(titleName, nil);
- return cell;
- }
- - (void)userTableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
- switch (indexPath.row) {
- case 0:
- [self showBabyList];
- break;
- case 1:
- [self showAccountManager];
- break;
- case 2:
- [self showAboutUS];
- break;
- default:
- break;
- }
- }
- - (void)showBabyList{
- [MobClick event:@"ClickBabyList"];
- UIViewController *modPasswordVC = [[self storyboard] instantiateViewControllerWithIdentifier:@"BabyListVC"];
- [self pushViewController:modPasswordVC animated:YES];
- }
- - (void)showAccountManager {
- [MobClick event:@"ClickAccountManagerFromRight"];
- UIViewController *accountManager = [[self storyboard] instantiateViewControllerWithIdentifier:@"AccountManagerVC"];
- [self pushViewController:accountManager animated:YES];
- }
- - (void)showGuide {
- SKWebViewViewController *webVc = [[self storyboard] instantiateViewControllerWithIdentifier:@"WebViewVC"];
- webVc.title = NSLocalizedString(@"Guide.View.Title", nil);
- webVc.urlToOpen = @"http://m.kido.com.cn/index.php?m=content&c=index&a=lists&catid=13";
- webVc.isLockGestureRecognizer = YES;
- [self pushViewController:webVc animated:YES];
- }
- - (void)showGuideForK1K1S {
- [MobClick event:@"ClickNewbieGuide"];
- UIViewController *vc = [[self storyboard] instantiateViewControllerWithIdentifier:@"guideViewVC"];
- [self pushViewController:vc animated:YES];
- }
- - (void)showPushHistory {
- UIViewController *controller = [[self storyboard] instantiateViewControllerWithIdentifier:@"PushHistoryVC"];
- [self pushViewController:controller animated:YES];
- }
- - (void)showAboutUS {
- UIViewController *vc = [[self storyboard] instantiateViewControllerWithIdentifier:@"VersionVC"];
- [self pushViewController:vc animated:YES];
- }
- - (void)testMasonry {
- TestMasonryViewController *vc = [[self storyboard] instantiateViewControllerWithIdentifier:@"TestMasonryVC"];
- [self pushViewController:vc animated:YES];
- [vc addObserver:self forKeyPath:@"mTextField.text" options:NSKeyValueObservingOptionNew context:nil];
- }
- @end
|