Skip to content

Commit

Permalink
整理并运行起来项目
Browse files Browse the repository at this point in the history
  • Loading branch information
iOSGL committed Mar 26, 2019
1 parent 954d572 commit 8b04172
Show file tree
Hide file tree
Showing 1,557 changed files with 13,369 additions and 10,349 deletions.
Binary file modified .DS_Store
Binary file not shown.
797 changes: 797 additions & 0 deletions platforms/InterviewHome/InterviewHome.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildSystemType</key>
<string>Original</string>
</dict>
</plist>
17 changes: 17 additions & 0 deletions platforms/InterviewHome/InterviewHome/AppDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// AppDelegate.h
// InterviewHome
//
// Created by genglei on 2019/3/26.
// Copyright © 2019年 genglei. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;


@end

42 changes: 12 additions & 30 deletions platforms/ios/WeexDemo/AppDelegate.m → ...InterviewHome/InterviewHome/AppDelegate.m
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/**
* Created by Weex.
* Copyright (c) 2016, Alibaba, Inc. All rights reserved.
*
* This source code is licensed under the Apache Licence 2.0.
* For the full copyright and license information,please view the LICENSE file in the root directory of this source tree.
*/
//
// AppDelegate.m
// InterviewHome
//
// Created by genglei on 2019/3/26.
// Copyright © 2019年 genglei. All rights reserved.
//

#import "AppDelegate.h"
#import "DemoDefine.h"
#import "WXDefine.h"
#import <WeexSDK/WeexSDK.h>
#import <AVFoundation/AVFoundation.h>
#import "WeexSDKManager.h"
Expand All @@ -21,18 +21,12 @@
#import <SSZipArchive/SSZipArchive.h>
#import "UpdateApi.h"

@interface AppDelegate ()

@interface AppDelegate () <UNUserNotificationCenterDelegate>
@end

@implementation AppDelegate

#pragma mark
#pragma mark application

#pragma mark
#pragma mark - Define

#define UM_APPKEY @"5b3de566f29d980dae00007a"
#define SINA_APPKEY @"3646337853"
#define SINA_SECRET @"bee7d46f7512a6faa54739323d429ecc"
Expand All @@ -52,7 +46,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
[AppConfig setUp];
[WeexSDKManager setup];
[self.window makeKeyAndVisible];
// [self startSplashScreen];
// [self startSplashScreen];
[self checkUpdate];
return YES;
}
Expand Down Expand Up @@ -186,14 +180,14 @@ - (void)configUMPush:(NSDictionary *)launchOptions {
#pragma mark -

- (void)configUMSharePlatforms {
[UMSocialGlobal shareInstance].isUsingHttpsWhenShareContent = NO;
[UMSocialGlobal shareInstance].isUsingHttpsWhenShareContent = NO;
[[UMSocialManager defaultManager] setPlaform:UMSocialPlatformType_WechatSession appKey:WX_APPKEY appSecret:WX_APP_SECRETC redirectURL:@"http://mobile.umeng.com/social"];
[[UMSocialManager defaultManager] removePlatformProviderWithPlatformTypes:@[@(UMSocialPlatformType_WechatFavorite)]];
[[UMSocialManager defaultManager] setPlaform:UMSocialPlatformType_QQ appKey:QQ_APPKID/*设置QQ平台的appID*/ appSecret:nil redirectURL:@"http://mobile.umeng.com/social"];
[[UMSocialManager defaultManager] setPlaform:UMSocialPlatformType_Sina appKey:SINA_APPKEY appSecret:SINA_SECRET redirectURL:@"https://sns.whalecloud.com/sina2/callback"];
}

#pragma mark
#pragma mark
#pragma mark animation when startup

- (void)startSplashScreen
Expand Down Expand Up @@ -279,18 +273,6 @@ - (void)checkUpdate {
} failure:^(__kindof YTKBaseRequest * _Nonnull request) {

}];


// UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"发现新版本" message:@"" preferredStyle:UIAlertControllerStyleAlert];
// UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"暂不更新" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
//
// }];
// UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"立即更新" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
//
// }];
// [alert addAction:cancelAction];
// [alert addAction:okAction];
// [[MethodsUtil getCurrentVC] presentViewController:alert animated:YES completion:nil];
}

@end
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//

#import "BaseProcessHandler.h"
#import "WXDemoViewController.h"
#import "DemoDefine.h"
#import "WXViewController.h"
#import "WXDefine.h"

NSString *const serviceTypeWeb = @"web";

Expand All @@ -27,8 +27,8 @@ - (void)mediatorViewController:(UIViewController *)viewController
}
NSString *webUrl = [NSString stringWithFormat:@"?weburl=%@",param[@"url"]];
path = [path stringByAppendingString:webUrl];
UIViewController *demo = [[WXDemoViewController alloc] init];
((WXDemoViewController *)demo).url = [NSURL URLWithString:path];
UIViewController *demo = [[WXViewController alloc] init];
((WXViewController *)demo).url = [NSURL URLWithString:path];
[viewController.navigationController pushViewController:demo animated:YES];
}
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import "SkillsViewController.h"
#import "UIViewController+WXDemoNaviBar.h"
#import "WXViewController+WXNaviBar.h"
#import "SkillTableView.h"

@interface SkillsViewController ()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// StorageViewController.h
// WeexDemo
//
// Created by genglei on 2019/3/25.
// Copyright © 2019年 genglei. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface StorageViewController : UIViewController

@end


Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//
// StorageViewController.m
// WeexDemo
//
// Created by genglei on 2019/3/25.
// Copyright © 2019年 genglei. All rights reserved.
//

#import "StorageViewController.h"

@interface StorageViewController ()

@end

@implementation StorageViewController

- (void)viewDidLoad {
[super viewDidLoad];
[self configUI];
}

- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:false animated:true];
}

#pragma mark - Config UI

- (void)configUI {
self.navigationItem.title = @"测试存储";
self.view.backgroundColor = [UIColor whiteColor];
}

@end
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
#define CURRENT_IP @"your computer device ip"

#if TARGET_IPHONE_SIMULATOR
#define DEMO_HOST @"127.0.0.1"
#define APP_HOST @"192.168.0.102"
#else
#define DEMO_HOST CURRENT_IP
#define APP_HOST CURRENT_IP
#endif

#define DEMO_URL(path) [NSString stringWithFormat:@"http://%@:12580/%s", DEMO_HOST, #path]
#define DEMO_URL(path) [NSString stringWithFormat:@"http://%@:12580/%s", APP_HOST, #path]

#define HOME_URL [NSString stringWithFormat:@"http://%@:8080/dist/index.js", DEMO_HOST]
#define HOME_URL [NSString stringWithFormat:@"http://%@:8080/dist/index.js", APP_HOST]

#define BUNDLE_URL [NSString stringWithFormat:@"file://%@/bundlejs/index.js",[NSBundle mainBundle].bundlePath]

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//

#import "WeexSDKManager.h"
#import "DemoDefine.h"
#import "WXDefine.h"
#import <WeexSDK/WeexSDK.h>
#import "WXDemoViewController.h"
#import "WXViewController.h"
#import "WXImgLoaderDefaultImpl.h"
#import "UM_WeexModule.h"
#import "WXNavigatorHandle.h"
Expand Down Expand Up @@ -68,12 +68,13 @@ + (void)initWeexSDK
#ifdef DEBUG
[WXLog setLogLevel:WXLogLevelLog];
#endif

}

+ (void)loadCustomContainWithScannerWithUrl:(NSURL *)url
{
UIViewController *demo = [[WXDemoViewController alloc] init];
((WXDemoViewController *)demo).url = url;
UIViewController *demo = [[WXViewController alloc] init];
((WXViewController *)demo).url = url;
[[UIApplication sharedApplication] delegate].window.rootViewController = [[WXRootViewController alloc] initWithRootViewController:demo];
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// WXViewController+WXNaviBar.h
// InterviewHome
//
// Created by genglei on 2019/3/26.
// Copyright © 2019年 genglei. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "WXDefine.h"

@interface UIViewController (WXNaviBar)

/**
* back button click action
* @param sender responder
*/
- (void)backButtonClicked:(id)sender;

- (void)setupNaviBar;

@end


Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
/**
* Created by Weex.
* Copyright (c) 2016, Alibaba, Inc. All rights reserved.
*
* This source code is licensed under the Apache Licence 2.0.
* For the full copyright and license information,please view the LICENSE file in the root directory of this source tree.
*/
//
// WXViewController+WXNaviBar.m
// InterviewHome
//
// Created by genglei on 2019/3/26.
// Copyright © 2019年 genglei. All rights reserved.
//

#import "UIViewController+WXDemoNaviBar.h"
#import <WeexSDK/WeexSDK.h>
#import <objc/runtime.h>
#import "WXViewController+WXNaviBar.h"

@implementation UIViewController (WXDemoNaviBar)
@implementation UIViewController (WXNaviBar)

- (void)setupNaviBar
{
Expand All @@ -19,22 +17,22 @@ - (void)setupNaviBar
edgePanGestureRecognizer.edges = UIRectEdgeLeft;
[self.view addGestureRecognizer:edgePanGestureRecognizer];

// NSArray *ver = [[UIDevice currentDevice].systemVersion componentsSeparatedByString:@"."];
// if ([[ver objectAtIndex:0] intValue] >= 7) {
// // iOS 7.0 or later
// self.navigationController.navigationBar.barTintColor = WEEX_COLOR;
// self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
// self.navigationController.navigationBar.translucent = NO;
// }else {
// // iOS 6.1 or earlier
// self.navigationController.navigationBar.tintColor = WEEX_COLOR;
// }
// NSArray *ver = [[UIDevice currentDevice].systemVersion componentsSeparatedByString:@"."];
// if ([[ver objectAtIndex:0] intValue] >= 7) {
// // iOS 7.0 or later
// self.navigationController.navigationBar.barTintColor = WEEX_COLOR;
// self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
// self.navigationController.navigationBar.translucent = NO;
// }else {
// // iOS 6.1 or earlier
// self.navigationController.navigationBar.tintColor = WEEX_COLOR;
// }

// [self.navigationController.navigationBar setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys:
// [UIColor whiteColor], NSForegroundColorAttributeName, nil]];
// self.navigationItem.title = @"Weex Playground";

// [self.navigationController.navigationBar setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys:
// [UIColor whiteColor], NSForegroundColorAttributeName, nil]];
// self.navigationItem.title = @"Weex Playground";


self.navigationController.navigationBar.barTintColor = UIColorHex(0xfafafa);
NSDictionary *textAttributes = @{
NSFontAttributeName : [UIFont boldSystemFontOfSize:18],
Expand All @@ -46,7 +44,7 @@ - (void)setupNaviBar
self.edgesForExtendedLayout = UIRectEdgeBottom | UIRectEdgeLeft | UIRectEdgeRight;
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:YES];


UIImage *backImage = [[UIImage imageNamed:@"navigaitonback"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
UIButton *backButton = [UIButton buttonWithType:UIButtonTypeSystem];
backButton.frame = CGRectMake(0, 0, 32, 32);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import <UIKit/UIKit.h>
#import <SRWebSocket.h>

@interface WXDemoViewController : UIViewController<SRWebSocketDelegate>
@interface WXViewController : UIViewController<SRWebSocketDelegate>

@property (nonatomic, strong) NSString *script;
@property (nonatomic, strong) NSURL *url;
Expand Down
Loading

0 comments on commit 8b04172

Please sign in to comment.