23 | Hello is the first word in computer World for programming ; these developer will begin form this .
24 |
25 |
26 | , with event: UIEvent?) {
21 | present(XCAdaptiveViewController(), animated: true, completion: nil)
22 | }
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/XCCoordinatorDemo/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // XCCoordinatorDemo
4 | //
5 | // Created by Alexcai on 2019/4/18.
6 | // Copyright © 2019 dongjiu. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController,XCStoryboard {
12 | weak var coordinator: MainCoordinator?
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view.
16 | }
17 |
18 | @IBAction func buyTapped(_ sender: Any) {
19 | coordinator?.buySubscription()
20 | }
21 |
22 | @IBAction func createAccount(_ sender: Any) {
23 | coordinator?.creatAccount()
24 | }
25 |
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/XCCoordinatorDemo/XCStoryboard.swift:
--------------------------------------------------------------------------------
1 | //
2 | // XCStoryboard.swift
3 | // XCCoordinatorDemo
4 | //
5 | // Created by Alexcai on 2019/4/18.
6 | // Copyright © 2019 dongjiu. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import UIKit
11 |
12 | protocol XCStoryboard {
13 | static func instantiate() -> Self
14 | }
15 |
16 |
17 | extension XCStoryboard where Self:UIViewController{
18 | static func instantiate() -> Self{
19 | let fullName = NSStringFromClass(self)
20 | let clsName = fullName.components(separatedBy: ".")[1]
21 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle.main)
22 | return storyboard.instantiateViewController(withIdentifier: clsName) as! Self
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/RouterDemo/Controllers/XCTwoController.m:
--------------------------------------------------------------------------------
1 | //
2 | // XCTwoController.m
3 | // RouterDemo
4 | //
5 | // Created by Alexcai on 2019/4/4.
6 | // Copyright © 2019 dongjiu. All rights reserved.
7 | //
8 |
9 | #import "XCTwoController.h"
10 | #import "FCRouter.h"
11 |
12 | @interface XCTwoController ()
13 |
14 | @end
15 |
16 | @implementation XCTwoController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | self.title = @"Two Controller";
21 | }
22 | - (IBAction)clickedButton:(UIButton *)sender {
23 | /** 调用注册的 block */
24 | [FCRouter.share matchHandleWithUrl:@"app://oneHandle" userInfo:@{@"name":@"hello",@"b": self.title}];
25 | }
26 |
27 | - (void)dealloc{
28 | NSLog(@"%s",__FUNCTION__);
29 | }
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Web/Vue入门/13-Vue生命周期.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vue生命周期
9 |
10 |
11 |
12 | {{name}}
13 |
14 |
15 |
16 |
17 |
30 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/RouterDemo.xcodeproj/xcshareddata/xcbaselines/D848358121B63085006C7AA4.xcbaseline/650B6E9A-C5AC-4BEC-ACB4-52680879FA42.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | classNames
6 |
7 | XCUnitTest
8 |
9 | testPerformanceExample
10 |
11 | com.apple.XCTPerformanceMetric_WallClockTime
12 |
13 | baselineAverage
14 | 4.3846e-06
15 | baselineIntegrationDisplayName
16 | Local Baseline
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Web/Vue入门/18-Vue定义子组件.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 子组件定义
9 |
10 |
11 |
12 |
13 |
14 |
15 |
32 |
--------------------------------------------------------------------------------
/Web/Vue入门/03-v-model.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | V-Model(数据双向绑定)
7 |
8 |
9 |
10 |
11 |
12 |
13 | {{name}}
14 |
15 |
16 |
v - model
17 |
18 |
19 |
20 |
v - bind
21 |
22 |
23 |
24 |
25 |
26 |
34 |
35 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/XCUnitTest/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/RouterDemoUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/XCCoordinatorDemo/XCBuyCoordinator.swift:
--------------------------------------------------------------------------------
1 | //
2 | // XCBuyCoordinator.swift
3 | // XCCoordinatorDemo
4 | //
5 | // Created by Alexcai on 2019/4/19.
6 | // Copyright © 2019 dongjiu. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import UIKit
11 |
12 | class XCBuyCoordinator: XCCoordinator {
13 |
14 | weak var parentCoordinator: MainCoordinator?
15 |
16 | var chileCoordinators = [XCCoordinator]()
17 |
18 | var navigationController: UINavigationController
19 |
20 | init(navigatroller:UINavigationController) {
21 | self.navigationController = navigatroller
22 | }
23 |
24 | func start() {
25 | let vc = XCBuyViewController.instantiate()
26 | vc.coordinator = self
27 | navigationController.pushViewController(vc, animated: true)
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/Web/Vue入门/11-v-source(Get请求).html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | V-Source GET请求
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
{{result}}
15 |
16 |
17 |
35 |
--------------------------------------------------------------------------------
/Web/Vue入门/25-computed计算方法.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | vue计算属性
10 |
11 |
12 |
13 |
14 |
15 |
16 | {{fullname}}
17 |
18 |
19 |
35 |
36 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/AdaptiveRaywenderlich/XCAdaptiveViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // XCAdaptiveViewController.swift
3 | // AdaptiveRaywenderlich
4 | //
5 | // Created by Alexcai on 2019/5/9.
6 | // Copyright © 2019 dongjiu. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class XCAdaptiveViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 |
16 | // Do any additional setup after loading the view.
17 | }
18 |
19 |
20 | /*
21 | // MARK: - Navigation
22 |
23 | // In a storyboard-based application, you will often want to do a little preparation before navigation
24 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
25 | // Get the new view controller using segue.destination.
26 | // Pass the selected object to the new view controller.
27 | }
28 | */
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/RouterDemo/XCTabBarController.m:
--------------------------------------------------------------------------------
1 | //
2 | // XCTabBarController.m
3 | // RouterDemo
4 | //
5 | // Created by Alexcai on 2018/12/7.
6 | // Copyright © 2018 dongjiu. All rights reserved.
7 | //
8 |
9 | #import "XCTabBarController.h"
10 |
11 | @interface XCTabBarController ()
12 |
13 |
14 |
15 | @end
16 |
17 | @implementation XCTabBarController
18 |
19 | //- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item{
20 | // NSUInteger selectedIndex = self.selectedIndex;
21 | // CATransition *transition = [CATransition animation];
22 | //
23 | // transition.type = kCATransitionPush;
24 | // if (selectedIndex == 1) {
25 | // transition.subtype = kCATransitionFromLeft;
26 | // }else{
27 | // transition.subtype = kCATransitionFromRight;
28 | // }
29 | //
30 | // [self.view.layer addAnimation:transition forKey:nil];
31 | //}
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/Web/Vue入门/06-v-if.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | V-IF
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
div is display
15 |
16 |
17 |
v-show
18 |
19 |
20 |
21 |
34 |
35 |
--------------------------------------------------------------------------------
/Web/Vue入门/10-自定义指令应用.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 自定义指令应用
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
40 |
41 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/CADemo/Controllers/XCDrawingViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // XCDrawingViewController.m
3 | // CADemo
4 | //
5 | // Created by Alexcai on 2018/12/12.
6 | // Copyright © 2018 dongjiu. All rights reserved.
7 | //
8 |
9 | #import "XCDrawingViewController.h"
10 |
11 | @interface XCDrawingViewController ()
12 |
13 | @end
14 |
15 | @implementation XCDrawingViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view.
20 | }
21 |
22 | /*
23 | #pragma mark - Navigation
24 |
25 | // In a storyboard-based application, you will often want to do a little preparation before navigation
26 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
27 | // Get the new view controller using [segue destinationViewController].
28 | // Pass the selected object to the new view controller.
29 | }
30 | */
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/Web/Vue入门/24-watch使用.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | watch
10 |
11 |
12 |
13 |
20 |
21 |
38 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/CoreAnimationForMac/XCResponseWindowController.m:
--------------------------------------------------------------------------------
1 | //
2 | // XCResponseWindowController.m
3 | // CoreAnimationForMac
4 | //
5 | // Created by Alexcai on 2019/3/22.
6 | // Copyright © 2019 dongjiu. All rights reserved.
7 | //
8 |
9 | #import "XCResponseWindowController.h"
10 |
11 | @implementation XCResponseWindowController
12 |
13 | //- (void)keyDown:(NSEvent *)event{
14 | // NSLog(@"%s",__FUNCTION__);
15 | // NSLog(@"view nextResponder =%@",self.window.contentViewController.view.nextResponder);
16 | // NSLog(@"window content controller nextResponder =%@",self.window.contentViewController.nextResponder);
17 | // NSLog(@"window nextResponder = %@",self.window.nextResponder);
18 | // NSLog(@"window controller nextResponder =%@",self.nextResponder);
19 | //}
20 |
21 |
22 | - (void)noResponderFor:(SEL)eventSelector{
23 | NSLog(@"%@",NSStringFromSelector(eventSelector));
24 | }
25 | @end
26 |
--------------------------------------------------------------------------------
/Web/Vue入门/12-v-source(Post请求).html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | V-Source POST请求
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
{{result}}
15 |
16 |
17 |
18 |
36 |
37 |
--------------------------------------------------------------------------------
/Web/WebPack入门/build.js:
--------------------------------------------------------------------------------
1 | !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){n(1)},function(e,t){e.exports=function(e,t){return e+t}}]);
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/UICollectionViewDemo/XCViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // XCViewCell.m
3 | // UICollectionViewDemo
4 | //
5 | // Created by Alexcai on 2018/12/6.
6 | // Copyright © 2018 dongjiu. All rights reserved.
7 | //
8 |
9 | #import "XCViewCell.h"
10 |
11 | @implementation XCViewCell
12 |
13 | - (void)prepareForReuse{
14 | [super prepareForReuse];
15 | NSLog(@"old text === %@",self.iconLabel.text);
16 | }
17 |
18 | - (void)awakeFromNib{
19 | [super awakeFromNib];
20 |
21 | UIView *selectedView = [[UIView alloc]init];
22 | selectedView.alpha = 0.5;
23 | selectedView.backgroundColor = UIColor.redColor;
24 | self.selectedBackgroundView = selectedView;
25 |
26 | }
27 |
28 | - (void)setHighlighted:(BOOL)highlighted{
29 | [super setHighlighted:highlighted];
30 | if (highlighted) {
31 | self.selectedBackgroundView.alpha = 0.8;
32 | }else{
33 | self.selectedBackgroundView.alpha = 0.5;
34 | }
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/XCCoordinatorDemo/XCCreateAccountViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // XCCreateAccountViewController.swift
3 | // XCCoordinatorDemo
4 | //
5 | // Created by Alexcai on 2019/4/18.
6 | // Copyright © 2019 dongjiu. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class XCCreateAccountViewController: UIViewController,XCStoryboard {
12 |
13 | weak var coordinator: MainCoordinator?
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 |
17 | // Do any additional setup after loading the view.
18 | }
19 |
20 |
21 |
22 | /*
23 | // MARK: - Navigation
24 |
25 | // In a storyboard-based application, you will often want to do a little preparation before navigation
26 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
27 | // Get the new view controller using segue.destination.
28 | // Pass the selected object to the new view controller.
29 | }
30 | */
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/CADemo/ViewModels/XCViewModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // XCViewModel.m
3 | // CADemo
4 | //
5 | // Created by Alexcai on 2018/12/11.
6 | // Copyright © 2018 dongjiu. All rights reserved.
7 | //
8 |
9 | #import "XCViewModel.h"
10 |
11 | @implementation XCViewModel
12 |
13 | + (NSString *)randName{
14 | NSArray *first = @[@"Alex",@"Bob",@"Bill",@"Charles",@"Dan",@"Dave",@"Ethan",@"Frank"];
15 | NSArray *last = @[@"AppleSpeed",@"Bandicoot",@"Caravan",@"Dabble",@"Ernest",@"Fortune"];
16 | NSUInteger index1 = (rand() / (double)INT_MAX) * first.count;
17 | NSUInteger index2 = (rand() / (double)INT_MAX) * last.count;
18 | return [NSString stringWithFormat:@"%@ %@",first[index1],last[index2]];
19 | }
20 |
21 | + (NSString *)randImageName{
22 | NSArray *imgName = @[@"icon_pipei",@"icon_datuan",@"icon_yule",@"icon_zhandui"];
23 | NSUInteger index = (rand() /(double) INT_MAX) * imgName.count;
24 | return [NSString stringWithFormat:@"%@@3x",imgName[index]];
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Web/Vue入门/15-animate-css.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Animation-css
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
35 |
--------------------------------------------------------------------------------
/Web/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Web/Vue入门/19-Vue组件切换.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Vue组件切换
10 |
11 |
12 |
13 |
19 |
20 |
21 |
38 |
39 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/XCCoordinatorDemo/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // XCCoordinatorDemo
4 | //
5 | // Created by Alexcai on 2019/4/18.
6 | // Copyright © 2019 dongjiu. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 | var mainCoordinator:MainCoordinator?
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 |
20 | let navController = UINavigationController()
21 | mainCoordinator = MainCoordinator(navigationController: navController)
22 | mainCoordinator?.start()
23 |
24 | window = UIWindow(frame: UIScreen.main.bounds)
25 | window?.rootViewController = navController
26 | window?.makeKeyAndVisible()
27 | return true
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/RouterDemo/Views/XCScrollView.m:
--------------------------------------------------------------------------------
1 | //
2 | // XCScrollView.m
3 | // RouterDemo
4 | //
5 | // Created by Alexcai on 2018/12/3.
6 | // Copyright © 2018 dongjiu. All rights reserved.
7 | //
8 |
9 | #import "XCScrollView.h"
10 |
11 | @interface XCScrollView ()
12 |
13 |
14 | @end
15 |
16 |
17 | @implementation XCScrollView
18 |
19 | - (void)awakeFromNib{
20 | [super awakeFromNib];
21 |
22 | UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(p_panInView:)];
23 | [self addGestureRecognizer:pan];
24 |
25 | }
26 |
27 |
28 |
29 | #pragma mark - Pan Gesture handle
30 | - (void)p_panInView:(UIPanGestureRecognizer *)pan{
31 | CGPoint p = [pan translationInView:self];
32 | // self.lastPoint = CGPointMake(p.x + self.lastPoint.x, p.y + self.lastPoint.y);
33 | NSLog(@"%f",p.x);
34 | CGRect b = self.bounds;
35 | b.origin.x -= p.x;
36 | b.origin.y -= p.y;
37 | self.bounds = b;
38 | [pan setTranslation:CGPointZero inView:self];
39 |
40 | }
41 | @end
42 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/XCMegeDemo/DetailViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // DetailViewController.m
3 | // XCMegeDemo
4 | //
5 | // Created by Alexcai on 2019/4/23.
6 | // Copyright © 2019 dongjiu. All rights reserved.
7 | //
8 |
9 | #import "DetailViewController.h"
10 |
11 | @interface DetailViewController ()
12 |
13 | @end
14 |
15 | @implementation DetailViewController
16 |
17 | - (void)configureView {
18 | // Update the user interface for the detail item.
19 | if (self.detailItem) {
20 | self.detailDescriptionLabel.text = [self.detailItem description];
21 | }
22 | }
23 |
24 |
25 | - (void)viewDidLoad {
26 | [super viewDidLoad];
27 | // Do any additional setup after loading the view.
28 | [self configureView];
29 | }
30 |
31 |
32 | #pragma mark - Managing the detail item
33 |
34 | - (void)setDetailItem:(NSDate *)newDetailItem {
35 | if (_detailItem != newDetailItem) {
36 | _detailItem = newDetailItem;
37 |
38 | // Update the view.
39 | [self configureView];
40 | }
41 | }
42 |
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/Web/Vue入门/05-v-on.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | V-ON 事件响应
6 |
7 |
8 |
9 |
10 |
{{name}}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
42 |
--------------------------------------------------------------------------------
/StatusBarDemoApp/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | Copyright © 2016年 codeMaster. All rights reserved.
27 | NSPrincipalClass
28 | NSApplication
29 |
30 |
31 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 Alexiuce
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/RouterDemo.xcodeproj/xcshareddata/xcbaselines/D848358121B63085006C7AA4.xcbaseline/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | runDestinationsByUUID
6 |
7 | 650B6E9A-C5AC-4BEC-ACB4-52680879FA42
8 |
9 | localComputer
10 |
11 | busSpeedInMHz
12 | 100
13 | cpuCount
14 | 1
15 | cpuKind
16 | Intel Core i7
17 | cpuSpeedInMHz
18 | 2200
19 | logicalCPUCoresPerPackage
20 | 8
21 | modelCode
22 | MacBookPro11,4
23 | physicalCPUCoresPerPackage
24 | 4
25 | platformIdentifier
26 | com.apple.platform.macosx
27 |
28 | targetArchitecture
29 | x86_64
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/CADemo/LayerTimer/XCTimeConfig.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | titleName
7 | Duration&RepeatCount
8 | controllerName
9 | XCTimeProtocolViewController
10 |
11 |
12 | titleName
13 | BeginTime&TimeOff
14 | controllerName
15 | XCBeginTimeViewController
16 |
17 |
18 | titleName
19 | CAMediaTimingFunc
20 | controllerName
21 | XCTimeFuncViewController
22 |
23 |
24 | titleName
25 | Custom Easing Functions
26 | controllerName
27 | XCTimeCustomFuncViewController
28 |
29 |
30 | titleName
31 | Time-Base Animation
32 | controllerName
33 | XCTimeBaseViewController
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/Web/Vue入门/14.Vue过渡动画.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Vue 过渡动画
8 |
9 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | Hello Showing
27 |
28 |
29 |
30 |
31 |
32 |
33 |
46 |
--------------------------------------------------------------------------------
/StatusBarDemoApp/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "mac",
5 | "size" : "16x16",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "mac",
10 | "size" : "16x16",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "mac",
15 | "size" : "32x32",
16 | "scale" : "1x"
17 | },
18 | {
19 | "idiom" : "mac",
20 | "size" : "32x32",
21 | "scale" : "2x"
22 | },
23 | {
24 | "idiom" : "mac",
25 | "size" : "128x128",
26 | "scale" : "1x"
27 | },
28 | {
29 | "idiom" : "mac",
30 | "size" : "128x128",
31 | "scale" : "2x"
32 | },
33 | {
34 | "idiom" : "mac",
35 | "size" : "256x256",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "mac",
40 | "size" : "256x256",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "mac",
45 | "size" : "512x512",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "mac",
50 | "size" : "512x512",
51 | "scale" : "2x"
52 | }
53 | ],
54 | "info" : {
55 | "version" : 1,
56 | "author" : "xcode"
57 | }
58 | }
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/XCTestApp/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | Copyright © 2018 dongjiu. All rights reserved.
27 | NSMainStoryboardFile
28 | Main
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/CoreAnimationForMac/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | Copyright © 2019 dongjiu. All rights reserved.
27 | NSMainStoryboardFile
28 | Main
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/XCTestApp/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "mac",
5 | "size" : "16x16",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "mac",
10 | "size" : "16x16",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "mac",
15 | "size" : "32x32",
16 | "scale" : "1x"
17 | },
18 | {
19 | "idiom" : "mac",
20 | "size" : "32x32",
21 | "scale" : "2x"
22 | },
23 | {
24 | "idiom" : "mac",
25 | "size" : "128x128",
26 | "scale" : "1x"
27 | },
28 | {
29 | "idiom" : "mac",
30 | "size" : "128x128",
31 | "scale" : "2x"
32 | },
33 | {
34 | "idiom" : "mac",
35 | "size" : "256x256",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "mac",
40 | "size" : "256x256",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "mac",
45 | "size" : "512x512",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "mac",
50 | "size" : "512x512",
51 | "scale" : "2x"
52 | }
53 | ],
54 | "info" : {
55 | "version" : 1,
56 | "author" : "xcode"
57 | }
58 | }
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/CoreAnimationForMac/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "mac",
5 | "size" : "16x16",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "mac",
10 | "size" : "16x16",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "mac",
15 | "size" : "32x32",
16 | "scale" : "1x"
17 | },
18 | {
19 | "idiom" : "mac",
20 | "size" : "32x32",
21 | "scale" : "2x"
22 | },
23 | {
24 | "idiom" : "mac",
25 | "size" : "128x128",
26 | "scale" : "1x"
27 | },
28 | {
29 | "idiom" : "mac",
30 | "size" : "128x128",
31 | "scale" : "2x"
32 | },
33 | {
34 | "idiom" : "mac",
35 | "size" : "256x256",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "mac",
40 | "size" : "256x256",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "mac",
45 | "size" : "512x512",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "mac",
50 | "size" : "512x512",
51 | "scale" : "2x"
52 | }
53 | ],
54 | "info" : {
55 | "version" : 1,
56 | "author" : "xcode"
57 | }
58 | }
--------------------------------------------------------------------------------
/Web/CSS禅意花园/04-居中显示.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 居中显示
8 |
9 |
10 |
11 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | “用CSS让元素居中显示并不是件很简单的事情——同样的合法CSS居中设置在不同浏览器中的表现行为却各有千秋。在处理Entomology时Hicks也自然遇到了这个问题,但幸运的是,他最终找到了一种临时补救措施。在介绍他的做法之前,让我们先来看一下CSS中常见的几种让元素水平居中显示的方法。”
31 |
32 | 摘录来自: [美]Dave Shea Molly E. Holzschlag. “CSS禅意花园(修订版)。” Apple Books.
33 |
34 |
35 |
36 | “另一种实现元素居中的方法是使用text-align属性,将该属性值设置为center并应用到body元素上即可。这种做法是彻头彻尾的hack,但它却能兼容大多数浏览器,所以在某些情况下也自然必不可少。
37 | 之所以说它是hack,是因为这种方法并没有将文本属性应用到文本上,而是应用到了作为容器的元素上。这也就给我们带来了额外的工作。”
38 |
39 | 摘录来自: [美]Dave Shea Molly E. Holzschlag. “CSS禅意花园(修订版)。” Apple Books.
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/StatusBarDemoApp/SBPopViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // SBPopViewController.m
3 | // StatusBarDemoApp
4 | //
5 | // Created by Alexcai on 2016/11/12.
6 | // Copyright © 2016年 codeMaster. All rights reserved.
7 | //
8 |
9 | #import "SBPopViewController.h"
10 |
11 | @interface SBPopViewController ()
12 |
13 | @end
14 |
15 | @implementation SBPopViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do view setup here.
20 | NSString *serverPath = @"https://www.tianqiapi.com/api/?version=v1";
21 | NSURL *url = [[NSURL alloc]initWithString:serverPath];
22 | NSURLRequest *request = [NSURLRequest requestWithURL:url];
23 |
24 | NSURLSession *session = [NSURLSession sessionWithConfiguration:NSURLSessionConfiguration.defaultSessionConfiguration];
25 |
26 | NSURLSessionDataTask *dt = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
27 | NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:nil];
28 | NSLog(@"dict = %@",dict);
29 | NSLog(@"responde = %@",response);
30 | }];
31 | [dt resume];
32 | }
33 | - (IBAction)quit:(NSButton *)sender {
34 |
35 | [[NSApplication sharedApplication] terminate:self];
36 | }
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/Web/Vue入门/21-Vue获取Dom指令.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | 获取Dom指令
10 |
11 |
12 |
13 |
14 |
15 | hello v-el
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
52 |
53 |
--------------------------------------------------------------------------------
/Web/Vue入门/04-v-for.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | V-FOR
7 |
8 |
9 |
10 |
11 |
12 |
13 | v-for
14 | - {{item}}
15 |
16 | (item,index) in list
17 | - index:{{index}} : item:{{item}}
18 |
19 | - $index--{{item}}
20 |
21 | item in user
22 | - {{item}}
23 |
24 | (item, key) in user
25 | - key:{{key}}== item:{{item}}
26 |
27 | (item,key,index) in user
28 | - {{item}}=={{key}}=={{index}}
29 |
30 | (item, index) in list v-bind key=index
31 | - {{item}}
32 |
33 |
34 |
35 |
36 |
45 |
46 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/RouterDemo/ListControllers/RouterTableViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // RouterTableViewController.m
3 | // RouterDemo
4 | //
5 | // Created by Alexcai on 2019/4/2.
6 | // Copyright © 2019 dongjiu. All rights reserved.
7 | //
8 |
9 | #import "RouterTableViewController.h"
10 | #import "XCOneController.h"
11 |
12 | @interface RouterTableViewController ()
13 |
14 | @end
15 |
16 | @implementation RouterTableViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 |
21 | }
22 |
23 | #pragma mark - Table view data source
24 |
25 |
26 |
27 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
28 | return 10;
29 | }
30 |
31 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
32 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"reuseIdentifier"];
33 | if (cell == nil) {
34 | cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"reuseIdentifier"];
35 | }
36 | // Configure the cell...
37 | cell.textLabel.text = @(indexPath.row).stringValue;
38 |
39 | return cell;
40 | }
41 |
42 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
43 |
44 | XCOneController *vc = [XCOneController new];
45 | [self.navigationController pushViewController:vc animated:YES];
46 |
47 |
48 |
49 | }
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/XCTestApp/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // XCTestApp
4 | //
5 | // Created by Alexcai on 2018/12/25.
6 | // Copyright © 2018 dongjiu. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "XCObj.h"
11 | @interface ViewController ()
12 |
13 | @property (weak) IBOutlet NSTextField *userName;
14 |
15 | @property (weak) IBOutlet NSSecureTextField *password;
16 |
17 | @property (weak) IBOutlet NSTextField *infoLabel;
18 |
19 | @end
20 |
21 | @implementation ViewController
22 |
23 | - (void)viewDidLoad {
24 | [super viewDidLoad];
25 |
26 | /** 获取所有正在运行的app 信息 */
27 | // NSArray *runingApp = NSWorkspace.sharedWorkspace.runningApplications;
28 | // for (NSRunningApplication *app in runingApp) {
29 | // NSLog(@"%@",app.localizedName);
30 | // }
31 |
32 | // Do any additional setup after loading the view.
33 | }
34 |
35 | - (void)setRepresentedObject:(id)representedObject {
36 | [super setRepresentedObject:representedObject];
37 | XCObj *obj = (XCObj *)representedObject;
38 | NSLog(@"obj name == %@",obj.name);
39 | // Update the view, if already loaded.
40 | }
41 | - (IBAction)login:(NSButton *)sender {
42 |
43 | if ([self.userName.stringValue isEqualToString:@"alex"] && [self.password.stringValue isEqualToString:@"123"]) {
44 | NSLog(@"登录成功");
45 | self.infoLabel.stringValue = @"登录成功";
46 | }else{
47 | NSLog(@"登录失败");
48 | self.infoLabel.stringValue = @"登录失败";
49 | }
50 |
51 | }
52 |
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/CADemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/UICollectionViewDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Web/Mock/detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "code": 0,
3 | "data": {
4 | "id": 591591111588,
5 | "item_id": 591591111588,
6 | "item_url": "https://h5.m.taobao.com/awp/core/detail.htm?id=591591111588",
7 | "cover": "https://img.alicdn.com/bao/uploaded/i2/37704812/O1CN01ZOO8cl1lPwNolFaBH_!!37704812.jpg",
8 | "title": "DANGARA韩国东大门女装2019夏季新圆领字母宽松显瘦大码长袖卫衣",
9 | "description": "",
10 | "discount_price": "225",
11 | "price": "225",
12 | "coupon_price": "5",
13 | "coupon_start_fee": "95.00",
14 | "coupon_end_time": "2019-06-30",
15 | "coupon_start_time": "2019-01-13",
16 | "coupon_remain_count": 99672,
17 | "CouponTotalCount": 99999,
18 | "coupon_info": "满95.00元减5元",
19 | "buyer_total": 0,
20 | "prediction_price": "9",
21 | "commodity_resource": 0,
22 | "images": {
23 | "string": [
24 | "https://img.alicdn.com/i3/37704812/O1CN01CXIanX1lPwNnq9Mzg_!!37704812.jpg",
25 | "https://img.alicdn.com/i3/37704812/O1CN01YffiAa1lPwNmQ3ZQH_!!37704812.jpg",
26 | "https://img.alicdn.com/i2/37704812/O1CN01ppjZL31lPwNnVnuZY_!!37704812.jpg",
27 | "https://img.alicdn.com/i1/37704812/O1CN01Q9F7Q91lPwNmQ4F1S_!!37704812.jpg"
28 | ]
29 | },
30 | "shop_name": "jing521958",
31 | "seller_id": 37704812,
32 | "description_url": "https://mdetail.tmall.com/templates/pages/desc?id=591591111588",
33 | "subsidy_price": "0.01"
34 | },
35 | "message": ""
36 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xcuserstate
23 |
24 | ## Obj-C/Swift specific
25 | *.hmap
26 | *.ipa
27 | *.dSYM.zip
28 | *.dSYM
29 |
30 | # CocoaPods
31 | #
32 | # We recommend against adding the Pods directory to your .gitignore. However
33 | # you should judge for yourself, the pros and cons are mentioned at:
34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
35 | #
36 | # Pods/
37 |
38 | # Carthage
39 | #
40 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
41 | # Carthage/Checkouts
42 |
43 | Carthage/Build
44 |
45 | # fastlane
46 | #
47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
48 | # screenshots whenever they are needed.
49 | # For more information about the recommended setup visit:
50 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
51 |
52 | fastlane/report.xml
53 | fastlane/screenshots
54 |
55 | #Code Injection
56 | #
57 | # After new code Injection tools there's a generated folder /iOSInjectionProject
58 | # https://github.com/johnno1962/injectionforxcode
59 |
60 | iOSInjectionProject/
61 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/CADemo/LayerTimer/XCTimeBaseViewController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/CADemo/LayerTimer/XCTimeCustomFuncViewController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/XCCoordinatorDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIRequiredDeviceCapabilities
26 |
27 | armv7
28 |
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/RouterDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Router
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0.1
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/CADemo/SpecializedLayers/XCEmitterLayerViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // XCEmitterLayerViewController.m
3 | // CADemo
4 | //
5 | // Created by Alexcai on 2019/1/23.
6 | // Copyright © 2019 dongjiu. All rights reserved.
7 | //
8 |
9 | #import "XCEmitterLayerViewController.h"
10 |
11 | @interface XCEmitterLayerViewController ()
12 |
13 | @end
14 |
15 | @implementation XCEmitterLayerViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view.
20 | self.title = NSStringFromClass(self.class);
21 | self.view.backgroundColor = UIColor.whiteColor;
22 | [self emitterDemo];
23 | }
24 | /** EmitterLayer test */
25 | - (void)emitterDemo{
26 | CAEmitterLayer *emitterLayer = [CAEmitterLayer layer];
27 | emitterLayer.frame = self.view.bounds;
28 | [self.view.layer addSublayer:emitterLayer];
29 |
30 | emitterLayer.renderMode = kCAEmitterLayerAdditive;
31 | emitterLayer.emitterPosition = CGPointMake(emitterLayer.frame.size.width * 0.5, emitterLayer.frame.size.height * 0.5);
32 |
33 | CAEmitterCell *cell = [CAEmitterCell emitterCell];
34 | cell.contents = (__bridge id _Nullable)([UIImage imageNamed:@"icon-service4"].CGImage);
35 |
36 | cell.birthRate = 1;
37 | cell.lifetime = 5.0;
38 | // cell.color = [UIColor colorWithRed:1 green:0.5 blue:0.1 alpha:1].CGColor;
39 | cell.alphaSpeed = -0.4;
40 | cell.velocity = 40;
41 | cell.velocityRange = 30;
42 | cell.emissionRange = M_PI ;
43 |
44 | emitterLayer.emitterCells = @[cell];
45 |
46 |
47 |
48 | }
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/Web/Vue入门/22-vue-router.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | Vue-router
11 |
12 |
13 |
14 |
15 |
16 | 登录
17 | 注册
18 |
19 |
20 |
21 |
22 |
56 |
57 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/CADemo/SpecializedLayers/XCGradientLayerViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // XCGradientLayerViewController.m
3 | // CADemo
4 | //
5 | // Created by Alexcai on 2019/1/17.
6 | // Copyright © 2019 dongjiu. All rights reserved.
7 | //
8 |
9 | #import "XCGradientLayerViewController.h"
10 |
11 | @interface XCGradientLayerViewController ()
12 |
13 | @end
14 |
15 | @implementation XCGradientLayerViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view.
20 | self.title = NSStringFromClass(self.class);
21 | self.view.backgroundColor = UIColor.whiteColor;
22 | [self multipartGradientLayer];
23 | [self gradientLayerDemo];
24 | }
25 |
26 | - (void)gradientLayerDemo{
27 | CAGradientLayer *gdLayer = [CAGradientLayer layer];
28 | gdLayer.colors = @[(__bridge id)UIColor.redColor.CGColor,(__bridge id)UIColor.blueColor.CGColor];
29 | gdLayer.startPoint = CGPointMake(0.5, 0.5);
30 | gdLayer.frame = CGRectMake(20, 100, 100, 50);
31 | [self.view.layer addSublayer:gdLayer];
32 | }
33 |
34 | - (void)multipartGradientLayer{
35 | CAGradientLayer *gradLayer = [CAGradientLayer layer];
36 | gradLayer.frame = CGRectMake(150, 100, 100, 100);
37 | [self.view.layer addSublayer:gradLayer];
38 | gradLayer.colors = @[(__bridge id)UIColor.redColor.CGColor,
39 | (__bridge id)UIColor.blueColor.CGColor,
40 | (__bridge id)UIColor.greenColor.CGColor];
41 | gradLayer.startPoint = CGPointZero;
42 | gradLayer.endPoint = CGPointMake(1,1);
43 | gradLayer.locations = @[@0.0, @0.25, @0.5];
44 | }
45 | @end
46 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/XCDrawing/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/XCAutoLayoutDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/AdaptiveRaywenderlich/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/CADemo/SpecializedLayers/XC_TabelViewControllerConfig.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | titleName
7 | CAShapeLayer Demo
8 | controllerName
9 | XCShapeViewController
10 |
11 |
12 | titleName
13 | CATextLayer Demo
14 | controllerName
15 | XCTextLayerViewController
16 |
17 |
18 | titleName
19 | CATransformLayer Demo
20 | controllerName
21 | XCTransformLayerViewController
22 |
23 |
24 | titleName
25 | GradientLayer Demo
26 | controllerName
27 | XCGradientLayerViewController
28 |
29 |
30 | titleName
31 | ReplicatorLayer Demo
32 | controllerName
33 | XCReplicatorLayerViewController
34 |
35 |
36 | titleName
37 | ScrollLayer Demo
38 | controllerName
39 | XCScrollLayerViewController
40 |
41 |
42 | titleName
43 | TiledLayer Demo
44 | controllerName
45 | XCTiledLayerViewController
46 |
47 |
48 | titleName
49 | EmitterLayer Demo
50 | controllerName
51 | XCEmitterLayerViewController
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/Web/Mock/banner.json:
--------------------------------------------------------------------------------
1 | {"code":0,"data":{"banners":[{"image":"https://img.alicdn.com/tfs/TB1OisobBiE3KVjSZFMXXbQhVXa-440-180.jpg","uri":"app://home/outerHtml?url=https://s.click.taobao.com/QyujL8w?k=接口调试\u0026m=1111"},{"image":"https://img.alicdn.com/tfs/TB1OisobBiE3KVjSZFMXXbQhVXa-440-180.jpg","uri":"app://home/outerHtml?url=https://s.click.taobao.com/QyujL8w?k=接口调试\u0026m=1111"},{"image":"https://img.alicdn.com/tfs/TB1OisobBiE3KVjSZFMXXbQhVXa-440-180.jpg","uri":"app://home/outerHtml?url=https://s.click.taobao.com/QyujL8w?k=接口调试\u0026m=1111"},{"image":"https://img.alicdn.com/tfs/TB1OisobBiE3KVjSZFMXXbQhVXa-440-180.jpg","uri":"app://home/outerHtml?url=https://s.click.taobao.com/QyujL8w?k=接口调试\u0026m=1111"},{"image":"https://img.alicdn.com/tfs/TB1OisobBiE3KVjSZFMXXbQhVXa-440-180.jpg","uri":"app://home/outerHtml?url=https://s.click.taobao.com/QyujL8w?k=接口调试\u0026m=1111"}],"ico":[{"image":"https://gw.alicdn.com/tfs/TB1Wxi2trsrBKNjSZFpXXcXhFXa-183-144.png","uri":"app://home/outerHtml?url=https://s.click.taobao.com/QyujL8w?k=接口调试\u0026m=1111","title":"测试标0"},{"image":"https://gw.alicdn.com/tfs/TB1Wxi2trsrBKNjSZFpXXcXhFXa-183-144.png","uri":"app://home/outerHtml?url=https://s.click.taobao.com/QyujL8w?k=接口调试\u0026m=1111","title":"测试标1"},{"image":"https://gw.alicdn.com/tfs/TB1Wxi2trsrBKNjSZFpXXcXhFXa-183-144.png","uri":"app://home/outerHtml?url=https://s.click.taobao.com/QyujL8w?k=接口调试\u0026m=1111","title":"测试标2"},{"image":"https://gw.alicdn.com/tfs/TB1Wxi2trsrBKNjSZFpXXcXhFXa-183-144.png","uri":"app://home/outerHtml?url=https://s.click.taobao.com/QyujL8w?k=接口调试\u0026m=1111","title":"测试标3"},{"image":"https://gw.alicdn.com/tfs/TB1Wxi2trsrBKNjSZFpXXcXhFXa-183-144.png","uri":"app://home/outerHtml?url=https://s.click.taobao.com/QyujL8w?k=接口调试\u0026m=1111","title":"测试标4"}]},"message":""}
2 |
--------------------------------------------------------------------------------
/Web/Vue入门/20-Vue组件间传值.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | 父子组件传值
10 |
11 |
12 |
13 |
14 |
15 |
下面是子组件view
16 |
17 |
18 |
下面是接收子组件的数据
19 | this is value form child : {{msg}}
20 |
21 |
22 |
23 |
24 |
25 |
26 | this is value form super :{{id}}
27 |
28 |
29 |
30 |
31 |
62 |
63 |
--------------------------------------------------------------------------------
/Web/Vue入门/17-Vue自定义组件.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Vue自定义组件
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | {{msg}}
18 |
登录123
19 |
注册
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
69 |
70 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/RouterDemo/Router/XCAppPresentViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // XCAppPresentViewController.m
3 | // RouterDemo
4 | //
5 | // Created by Alexcai on 2018/11/26.
6 | // Copyright © 2018 dongjiu. All rights reserved.
7 | //
8 |
9 | #import "XCAppPresentViewController.h"
10 |
11 | @interface XCAppPresentViewController ()
12 | @property (weak, nonatomic) IBOutlet UIScrollView *scrollView;
13 |
14 | @end
15 |
16 | @implementation XCAppPresentViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | // Do any additional setup after loading the view.
21 | [self p_scroll];
22 |
23 |
24 | }
25 | #pragma mark - private method
26 |
27 | - (void)p_scroll{
28 | for (int i = 0; i < 3; i++) {
29 |
30 | CGFloat x = 100 + i * 140;
31 | CGRect r = CGRectMake(x, 10, 80, 40);
32 |
33 | UIView *v = [[UIView alloc]initWithFrame:r];
34 | v.backgroundColor = UIColor.orangeColor;
35 | [self.scrollView addSubview:v];
36 | }
37 | self.scrollView.contentSize = CGSizeMake(1000, 0);
38 | }
39 |
40 | - (void)p_testDispatch{
41 | NSLog(@"%s",__FUNCTION__);
42 | NSLog(@"normal button");
43 | dispatch_async(dispatch_get_main_queue(), ^{
44 | NSLog(@"button");
45 | });
46 | }
47 |
48 |
49 | - (IBAction)clickDismissButton:(UIButton *)sender {
50 | [self dismissViewControllerAnimated:YES completion:nil];
51 | }
52 |
53 |
54 | #pragma mark - Delegate
55 |
56 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView{
57 | NSLog(@"bounds origin %@",NSStringFromCGPoint(scrollView.bounds.origin));
58 | NSLog(@"content off set %@",NSStringFromCGPoint(scrollView.contentOffset));
59 | }
60 | @end
61 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/CADemo/LayerTimer/XCTimeFuncViewController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/RouterDemoUITests/RouterDemoUITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // RouterDemoUITests.m
3 | // RouterDemoUITests
4 | //
5 | // Created by Alexcai on 2018/11/27.
6 | // Copyright © 2018 dongjiu. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | //#import "ViewController.h"
12 |
13 | @interface RouterDemoUITests : XCTestCase
14 |
15 | @property (nonatomic, strong) UIViewController *controller;
16 |
17 | @end
18 |
19 | @implementation RouterDemoUITests
20 |
21 | - (void)setUp {
22 | // Put setup code here. This method is called before the invocation of each test method in the class.
23 |
24 | // In UI tests it is usually best to stop immediately when a failure occurs.
25 | self.continueAfterFailure = NO;
26 |
27 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
28 | [[[XCUIApplication alloc] init] launch];
29 |
30 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
31 | self.controller = [UIViewController new];
32 | }
33 |
34 | - (void)tearDown {
35 | // Put teardown code here. This method is called after the invocation of each test method in the class.
36 | }
37 |
38 | - (void)testExample {
39 | // Use recording to get started writing UI tests.
40 | // Use XCTAssert and related functions to verify your tests produce the correct results.
41 | [self measureBlock:^{
42 | for (int i = 0; i < 10 ; i++) {
43 | UILabel *label = [UILabel new];
44 | label.text = [NSString stringWithFormat:@"test label -- %d",i];
45 | }
46 | }];
47 |
48 | }
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/CADemo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/RouterDemo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/XCDrawing/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/XCMegeDemo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/UICollectionViewDemo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/XCAutoLayoutDemo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/XCCoordinatorDemo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/AdaptiveRaywenderlich/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Web/Vue入门/01-HelloVue.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Title
7 |
8 |
35 |
36 |
37 |
38 |
39 |
40 |
商家
41 |
评论
42 |
价格
43 |
44 |
45 |
46 |
55 |
58 |
59 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/UICollectionViewDemo/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // UICollectionViewDemo
4 | //
5 | // Created by Alexcai on 2018/12/6.
6 | // Copyright © 2018 dongjiu. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "XCViewCell.h"
11 |
12 | static NSString *const ReusedKey = @"prefetch_cell";
13 |
14 | @interface ViewController ()
15 |
16 | @property (nonatomic, strong) NSArray *icons;
17 | @property (weak, nonatomic) IBOutlet UICollectionView *collectionView;
18 |
19 | @end
20 |
21 | @implementation ViewController
22 |
23 | - (void)viewDidLoad {
24 | [super viewDidLoad];
25 |
26 | _collectionView.canCancelContentTouches = NO;
27 | _collectionView.delaysContentTouches = NO;
28 |
29 | _icons = [@"🐍,👍,💄,🎏,🐠,🍔,🏩,🎈,🐷,👠,🐣,🐙,✈️,💅,⛑,👑,👛,🐝,🌂,🌻,🎼,🎧,🚧,📎,🍻" componentsSeparatedByString:@","];
30 |
31 | // Do any additional setup after loading the view, typically from a nib.
32 | }
33 |
34 |
35 | #pragma mark - UICollectionViewDataSource
36 |
37 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
38 | return _icons.count;
39 | }
40 |
41 | - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
42 | XCViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:ReusedKey forIndexPath:indexPath];
43 |
44 | cell.iconLabel.text = self.icons[indexPath.item];
45 |
46 | return cell;
47 | }
48 |
49 | #pragma mark - UICollectionViewDataSourcePrefetching
50 | - (void)collectionView:(UICollectionView *)collectionView prefetchItemsAtIndexPaths:(NSArray *)indexPaths{
51 |
52 | }
53 | @end
54 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/CADemo/Controllers/XCCollectionViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // XCCollectionViewController.m
3 | // CADemo
4 | //
5 | // Created by Alexcai on 2018/12/13.
6 | // Copyright © 2018 dongjiu. All rights reserved.
7 | //
8 |
9 | #import "XCCollectionViewController.h"
10 | #import "XCImageIOCollectionViewCell.h"
11 |
12 | @interface XCCollectionViewController ()
13 | @property (weak, nonatomic) IBOutlet UICollectionView *collectionView;
14 |
15 | @property (nonatomic, strong) NSArray *imagePaths;
16 |
17 | @end
18 |
19 | @implementation XCCollectionViewController
20 |
21 | - (void)viewDidLoad {
22 | [super viewDidLoad];
23 | self.imagePaths = [NSBundle.mainBundle pathsForResourcesOfType:@"png" inDirectory:@"Image"];
24 | }
25 |
26 | /*
27 | #pragma mark - Navigation
28 |
29 | // In a storyboard-based application, you will often want to do a little preparation before navigation
30 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
31 | // Get the new view controller using [segue destinationViewController].
32 | // Pass the selected object to the new view controller.
33 | }
34 | */
35 | #pragma mark - UICollectionViewDataSource
36 |
37 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
38 | return 100;
39 | }
40 | - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
41 | XCImageIOCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"imageIO" forIndexPath:indexPath];
42 | NSUInteger index = indexPath.item % 4;
43 | NSString *imagePath = self.imagePaths[index];
44 | cell.imageView.image = [UIImage imageWithContentsOfFile:imagePath];
45 |
46 | return cell;
47 | }
48 | @end
49 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment the next line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | target 'CADemo' do
5 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
6 | # use_frameworks!
7 |
8 | # Pods for CADemo
9 |
10 | end
11 |
12 | target 'CoreAnimationForMac' do
13 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
14 | # use_frameworks!
15 |
16 | # Pods for CoreAnimationForMac
17 |
18 | end
19 |
20 | target 'RouterDemo' do
21 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
22 | # use_frameworks!
23 |
24 | # Pods for RouterDemo
25 |
26 | target 'RouterDemoUITests' do
27 | inherit! :search_paths
28 | # Pods for testing
29 | end
30 |
31 | end
32 |
33 | target 'UICollectionViewDemo' do
34 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
35 | # use_frameworks!
36 |
37 | # Pods for UICollectionViewDemo
38 |
39 | end
40 |
41 | target 'XCARMAssembly' do
42 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
43 | # use_frameworks!
44 |
45 | # Pods for XCARMAssembly
46 |
47 | end
48 |
49 | target 'XCAutoLayoutDemo' do
50 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
51 | # use_frameworks!
52 |
53 | # Pods for XCAutoLayoutDemo
54 |
55 | end
56 |
57 | target 'XCDrawing' do
58 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
59 | # use_frameworks!
60 |
61 | # Pods for XCDrawing
62 |
63 | end
64 |
65 | target 'XCTestApp' do
66 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
67 | # use_frameworks!
68 |
69 | # Pods for XCTestApp
70 |
71 | end
72 |
--------------------------------------------------------------------------------
/Web/Vue入门/08-filter(过滤器).html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 过滤器
6 |
7 |
8 |
9 |
10 |
系统过滤器
11 |
12 | {{list | json}}
13 |
14 |
15 |
私有过滤器
16 |
17 | {{my_time}}
18 |
19 | {{my_time | time_filter}}
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | 全局过滤器
30 |
31 | {{my_time | dateFmt}}
32 |
33 |
34 |
35 |
36 |
75 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/RouterDemo/XCRunloopManager.m:
--------------------------------------------------------------------------------
1 | //
2 | // XCRunloopManager.m
3 | // RouterDemo
4 | //
5 | // Created by Alexcai on 2018/11/29.
6 | // Copyright © 2018 dongjiu. All rights reserved.
7 | //
8 |
9 | #import "XCRunloopManager.h"
10 |
11 | @implementation XCRunloopManager
12 |
13 |
14 |
15 | + (void)addRunloopObserver{
16 | /**
17 | kCFRunLoopEntry == 1 进入runloop ,
18 | kCFRunLoopBeforeTimers == 2 即将处理Timer,
19 | kCFRunLoopBeforeSources == 4 即将处理source,
20 | kCFRunLoopBeforeWaiting == 32 即将开始休眠,
21 | kCFRunLoopAfterWaiting == 64 从休眠唤醒,
22 | kCFRunLoopExit = 128 退出runloop,
23 | kCFRunLoopAllActivities 所有状态;
24 | */
25 |
26 | // 创建observer
27 | CFRunLoopObserverRef observer = CFRunLoopObserverCreateWithHandler(CFAllocatorGetDefault(), kCFRunLoopAllActivities, YES, 0, ^(CFRunLoopObserverRef observer, CFRunLoopActivity activity) {
28 |
29 | switch (activity) {
30 | case kCFRunLoopEntry:{
31 | NSLog(@"----进入runloop---");
32 | break;
33 | }
34 | case kCFRunLoopBeforeTimers:{
35 | NSLog(@"---- runloop准备处理Timer ---");
36 | break;
37 | }
38 | case kCFRunLoopBeforeSources:{
39 | NSLog(@"---- runloop准备处理Source ---");
40 | break;
41 | }
42 | case kCFRunLoopBeforeWaiting:{
43 | NSLog(@"---- runloop即将进入休眠 ---");
44 | break;
45 | }
46 | case kCFRunLoopAfterWaiting:{
47 | NSLog(@"---- runloop从休眠中唤醒 ---");
48 | break;
49 | }
50 | default:
51 | break;
52 | }
53 |
54 | });
55 |
56 | // 添加观察者:监听RunLoop的状态
57 | CFRunLoopAddObserver(CFRunLoopGetCurrent(), observer, kCFRunLoopDefaultMode);
58 | }
59 |
60 | @end
61 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/XCMegeDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UIStatusBarTintParameters
32 |
33 | UINavigationBar
34 |
35 | Style
36 | UIBarStyleDefault
37 | Translucent
38 |
39 |
40 |
41 | UISupportedInterfaceOrientations
42 |
43 | UIInterfaceOrientationPortrait
44 | UIInterfaceOrientationLandscapeLeft
45 | UIInterfaceOrientationLandscapeRight
46 |
47 | UISupportedInterfaceOrientations~ipad
48 |
49 | UIInterfaceOrientationPortrait
50 | UIInterfaceOrientationPortraitUpsideDown
51 | UIInterfaceOrientationLandscapeLeft
52 | UIInterfaceOrientationLandscapeRight
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/AdaptiveRaywenderlich/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Web/Vue入门/23-vue-router(嵌套路由).html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | V-router嵌套路由
11 |
12 |
13 |
14 |
15 | 登录
16 | 注册
17 | 用户账号
18 |
19 |
20 |
21 |
22 |
23 |
24 |
子路由嵌套
25 |
s1
26 |
s1
27 |
28 |
29 |
30 |
31 |
72 |
73 |
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/CADemo/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "size" : "1024x1024",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------
/XCRouterDemo/RouterDemo/XCDrawing/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "size" : "1024x1024",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------