1、MJPopupBackgroundView

  • 1.1 MJPopupBackgroundView.h

    1. //
    2. // MJPopupBackgroundView.h
    3. // watched
    4. //
    5. // Created by Martin Juhasz on 18.06.12.
    6. // Copyright (c) 2012 martinjuhasz.de. All rights reserved.
    7. //
    8. #import <UIKit/UIKit.h>
    9. @interface MJPopupBackgroundView : UIView
    10. @end
  • 1.2 MJPopupBackgroundView.h

    1. //
    2. // MJPopupBackgroundView.m
    3. // watched
    4. //
    5. // Created by Martin Juhasz on 18.06.12.
    6. // Copyright (c) 2012 martinjuhasz.de. All rights reserved.
    7. //
    8. #import "MJPopupBackgroundView.h"
    9. @implementation MJPopupBackgroundView
    10. - (void)drawRect:(CGRect)rect
    11. {
    12. CGContextRef context = UIGraphicsGetCurrentContext();
    13. size_t locationsCount = 2;
    14. CGFloat locations[2] = {0.0f, 1.0f};
    15. CGFloat colors[8] = {0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.75f};
    16. CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
    17. CGGradientRef gradient = CGGradientCreateWithColorComponents(colorSpace, colors, locations, locationsCount);
    18. CGColorSpaceRelease(colorSpace);
    19. CGPoint center = CGPointMake(self.bounds.size.width/2, self.bounds.size.height/2);
    20. float radius = MIN(self.bounds.size.width , self.bounds.size.height) ;
    21. CGContextDrawRadialGradient (context, gradient, center, 0, center, radius, kCGGradientDrawsAfterEndLocation);
    22. CGGradientRelease(gradient);
    23. }
    24. @end

2、UIViewController+MJPopupViewController

  • 2.1 UIViewController+MJPopupViewController.h

    1. //
    2. // UIViewController+MJPopupViewController.h
    3. // MJModalViewController
    4. //
    5. // Created by Martin Juhasz on 11.05.12.
    6. // Copyright (c) 2012 martinjuhasz.de. All rights reserved.
    7. //
    8. #import <UIKit/UIKit.h>
    9. @class MJPopupBackgroundView;
    10. typedef enum {
    11. MJPopupViewAnimationFade = 0,
    12. MJPopupViewAnimationSlideBottomTop = 1,
    13. MJPopupViewAnimationSlideBottomBottom,
    14. MJPopupViewAnimationSlideTopTop,
    15. MJPopupViewAnimationSlideTopBottom,
    16. MJPopupViewAnimationSlideLeftLeft,
    17. MJPopupViewAnimationSlideLeftRight,
    18. MJPopupViewAnimationSlideRightLeft,
    19. MJPopupViewAnimationSlideRightRight,
    20. } MJPopupViewAnimation;
    21. @interface UIViewController (MJPopupViewController)
    22. @property (nonatomic, retain) UIViewController *mj_popupViewController;
    23. @property (nonatomic, retain) MJPopupBackgroundView *mj_popupBackgroundView;
    24. - (void)presentPopupViewController:(UIViewController*)popupViewController animationType:(MJPopupViewAnimation)animationType;
    25. - (void)presentPopupViewController:(UIViewController*)popupViewController animationType:(MJPopupViewAnimation)animationType dismissed:(void(^)(void))dismissed;
    26. - (void)dismissPopupViewControllerWithanimationType:(MJPopupViewAnimation)animationType;
    27. @end
  • 2.1 UIViewController+MJPopupViewController.m

    1. //
    2. // UIViewController+MJPopupViewController.m
    3. // MJModalViewController
    4. //
    5. // Created by Martin Juhasz on 11.05.12.
    6. // Copyright (c) 2012 martinjuhasz.de. All rights reserved.
    7. //
    8. #import "UIViewController+MJPopupViewController.h"
    9. #import <QuartzCore/QuartzCore.h>
    10. #import "MJPopupBackgroundView.h"
    11. #import <objc/runtime.h>
    12. #define kPopupModalAnimationDuration 0.35
    13. #define kMJPopupViewController @"kMJPopupViewController"
    14. #define kMJPopupBackgroundView @"kMJPopupBackgroundView"
    15. #define kMJSourceViewTag 23941
    16. #define kMJPopupViewTag 23942
    17. #define kMJOverlayViewTag 23945
    18. @interface UIViewController (MJPopupViewControllerPrivate)
    19. - (UIView*)topView;
    20. - (void)presentPopupView:(UIView*)popupView;
    21. @end
    22. static NSString *MJPopupViewDismissedKey = @"MJPopupViewDismissed";
    23. static BOOL boards = NO;
    24. static BOOL MJPopupViewisShow = NO;
    25. ////////////////////////////////////////////////////////////////////////////
    26. #pragma mark -
    27. #pragma mark Public
    28. @implementation UIViewController (MJPopupViewController)
    29. static void * const keypath = (void*)&keypath;
    30. - (UIViewController*)mj_popupViewController {
    31. return objc_getAssociatedObject(self, kMJPopupViewController);
    32. }
    33. - (void)setMj_popupViewController:(UIViewController *)mj_popupViewController {
    34. objc_setAssociatedObject(self, kMJPopupViewController, mj_popupViewController, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
    35. }
    36. - (MJPopupBackgroundView*)mj_popupBackgroundView {
    37. return objc_getAssociatedObject(self, kMJPopupBackgroundView);
    38. }
    39. - (void)setMj_popupBackgroundView:(MJPopupBackgroundView *)mj_popupBackgroundView {
    40. objc_setAssociatedObject(self, kMJPopupBackgroundView, mj_popupBackgroundView, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
    41. }
    42. - (void)presentPopupViewController:(UIViewController*)popupViewController animationType:(MJPopupViewAnimation)animationType dismissed:(void(^)(void))dismissed
    43. {
    44. if (!MJPopupViewisShow) {
    45. MJPopupViewisShow = YES;
    46. self.mj_popupViewController = popupViewController;
    47. [self presentPopupView:popupViewController.view animationType:animationType dismissed:dismissed];
    48. }
    49. }
    50. - (void)presentPopupViewController:(UIViewController*)popupViewController animationType:(MJPopupViewAnimation)animationType
    51. {
    52. [self presentPopupViewController:popupViewController animationType:animationType dismissed:nil];
    53. }
    54. - (void)dismissPopupViewControllerWithanimationType:(MJPopupViewAnimation)animationType
    55. {
    56. MJPopupViewisShow = NO;
    57. [[NSNotificationCenter defaultCenter] postNotificationName:@"MJPopupViewDismiss" object:nil];
    58. UIView *sourceView = [self topView];
    59. if (sourceView.tag != kMJSourceViewTag && sourceView.tag == kMJPopupViewTag) {
    60. sourceView = [sourceView superview];
    61. }
    62. UIView *popupView = [sourceView viewWithTag:kMJPopupViewTag];
    63. UIView *overlayView = [sourceView viewWithTag:kMJOverlayViewTag];
    64. switch (animationType) {
    65. case MJPopupViewAnimationSlideBottomTop:
    66. case MJPopupViewAnimationSlideBottomBottom:
    67. case MJPopupViewAnimationSlideTopTop:
    68. case MJPopupViewAnimationSlideTopBottom:
    69. case MJPopupViewAnimationSlideLeftLeft:
    70. case MJPopupViewAnimationSlideLeftRight:
    71. case MJPopupViewAnimationSlideRightLeft:
    72. case MJPopupViewAnimationSlideRightRight:
    73. [self slideViewOut:popupView sourceView:sourceView overlayView:overlayView withAnimationType:animationType];
    74. break;
    75. default:
    76. [self fadeViewOut:popupView sourceView:sourceView overlayView:overlayView];
    77. break;
    78. }
    79. }
    80. ////////////////////////////////////////////////////////////////////////////
    81. #pragma mark -
    82. #pragma mark View Handling
    83. - (void)presentPopupView:(UIView*)popupView animationType:(MJPopupViewAnimation)animationType
    84. {
    85. if (!MJPopupViewisShow) {
    86. MJPopupViewisShow = YES;
    87. [self presentPopupView:popupView animationType:animationType dismissed:nil];
    88. }
    89. }
    90. - (void)keyboardAppearanced
    91. {
    92. boards = YES;
    93. }
    94. - (void)keyboardDismissed
    95. {
    96. boards = NO;
    97. }
    98. - (void)presentPopupView:(UIView*)popupView animationType:(MJPopupViewAnimation)animationType dismissed:(void(^)(void))dismissed
    99. {
    100. boards = NO;
    101. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardAppearanced) name:UIKeyboardDidShowNotification object:nil];
    102. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDismissed) name:UIKeyboardDidHideNotification object:nil];
    103. UIView *sourceView = [self topView];
    104. sourceView.tag = kMJSourceViewTag;
    105. popupView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin |UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleRightMargin;
    106. popupView.tag = kMJPopupViewTag;
    107. // check if source view controller is not in destination
    108. if ([sourceView.subviews containsObject:popupView]) return;
    109. // customize popupView
    110. popupView.layer.shadowPath = [UIBezierPath bezierPathWithRect:popupView.bounds].CGPath;
    111. popupView.layer.masksToBounds = YES;
    112. popupView.layer.shadowOffset = CGSizeMake(5, 5);
    113. popupView.layer.shadowRadius = 5;
    114. popupView.layer.shadowOpacity = 0.5;
    115. popupView.layer.cornerRadius = 5;
    116. popupView.layer.shouldRasterize = YES;
    117. popupView.layer.rasterizationScale = [[UIScreen mainScreen] scale];
    118. // Add semi overlay
    119. UIView *overlayView = [[UIView alloc] initWithFrame:sourceView.bounds];
    120. overlayView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
    121. overlayView.tag = kMJOverlayViewTag;
    122. overlayView.backgroundColor = [UIColor clearColor];
    123. // BackgroundView
    124. self.mj_popupBackgroundView = [[MJPopupBackgroundView alloc] initWithFrame:sourceView.bounds];
    125. self.mj_popupBackgroundView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
    126. self.mj_popupBackgroundView.backgroundColor = [UIColor clearColor];
    127. self.mj_popupBackgroundView.alpha = 0.0f;
    128. [overlayView addSubview:self.mj_popupBackgroundView];
    129. // Make the Background Clickable
    130. UIButton * dismissButton = [UIButton buttonWithType:UIButtonTypeCustom];
    131. dismissButton.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
    132. dismissButton.backgroundColor = [UIColor clearColor];
    133. dismissButton.frame = sourceView.bounds;
    134. [overlayView addSubview:dismissButton];
    135. popupView.alpha = 0.0f;
    136. [overlayView addSubview:popupView];
    137. [sourceView addSubview:overlayView];
    138. [dismissButton addTarget:self action:@selector(dismissPopupViewControllerWithanimation:) forControlEvents:UIControlEventTouchUpInside];
    139. switch (animationType) {
    140. case MJPopupViewAnimationSlideBottomTop:
    141. case MJPopupViewAnimationSlideBottomBottom:
    142. case MJPopupViewAnimationSlideTopTop:
    143. case MJPopupViewAnimationSlideTopBottom:
    144. case MJPopupViewAnimationSlideLeftLeft:
    145. case MJPopupViewAnimationSlideLeftRight:
    146. case MJPopupViewAnimationSlideRightLeft:
    147. case MJPopupViewAnimationSlideRightRight:
    148. dismissButton.tag = animationType;
    149. [self slideViewIn:popupView sourceView:sourceView overlayView:overlayView withAnimationType:animationType];
    150. break;
    151. default:
    152. dismissButton.tag = MJPopupViewAnimationFade;
    153. [self fadeViewIn:popupView sourceView:sourceView overlayView:overlayView];
    154. break;
    155. }
    156. [self setDismissedCallback:dismissed];
    157. }
    158. - (UIView*)topView {
    159. UIViewController *recentView = self;
    160. while (recentView.parentViewController != nil) {
    161. recentView = recentView.parentViewController;
    162. }
    163. return recentView.view;
    164. }
    165. - (void)dismissPopupViewControllerWithanimation:(id)sender
    166. {
    167. if (boards)
    168. {
    169. [[NSNotificationCenter defaultCenter] postNotificationName:@"disMissKeyBoard" object:nil];
    170. return ;
    171. }
    172. if ([sender isKindOfClass:[UIButton class]]) {
    173. UIButton* dismissButton = sender;
    174. switch (dismissButton.tag) {
    175. case MJPopupViewAnimationSlideBottomTop:
    176. case MJPopupViewAnimationSlideBottomBottom:
    177. case MJPopupViewAnimationSlideTopTop:
    178. case MJPopupViewAnimationSlideTopBottom:
    179. case MJPopupViewAnimationSlideLeftLeft:
    180. case MJPopupViewAnimationSlideLeftRight:
    181. case MJPopupViewAnimationSlideRightLeft:
    182. case MJPopupViewAnimationSlideRightRight:
    183. [self dismissPopupViewControllerWithanimationType:(int)dismissButton.tag];
    184. break;
    185. default:
    186. [self dismissPopupViewControllerWithanimationType:MJPopupViewAnimationFade];
    187. break;
    188. }
    189. } else {
    190. [self dismissPopupViewControllerWithanimationType:MJPopupViewAnimationFade];
    191. }
    192. }
    193. //////////////////////////////////////////////////////////////////////////////
    194. #pragma mark -
    195. #pragma mark Animations
    196. #pragma mark --- Slide
    197. - (void)slideViewIn:(UIView*)popupView sourceView:(UIView*)sourceView overlayView:(UIView*)overlayView withAnimationType:(MJPopupViewAnimation)animationType
    198. {
    199. // Generating Start and Stop Positions
    200. CGSize sourceSize = sourceView.bounds.size;
    201. CGSize popupSize = popupView.bounds.size;
    202. CGRect popupStartRect;
    203. switch (animationType) {
    204. case MJPopupViewAnimationSlideBottomTop:
    205. case MJPopupViewAnimationSlideBottomBottom:
    206. popupStartRect = CGRectMake((sourceSize.width - popupSize.width) / 2,
    207. sourceSize.height,
    208. popupSize.width,
    209. popupSize.height);
    210. break;
    211. case MJPopupViewAnimationSlideLeftLeft:
    212. case MJPopupViewAnimationSlideLeftRight:
    213. popupStartRect = CGRectMake(-sourceSize.width,
    214. (sourceSize.height - popupSize.height) / 2,
    215. popupSize.width,
    216. popupSize.height);
    217. break;
    218. case MJPopupViewAnimationSlideTopTop:
    219. case MJPopupViewAnimationSlideTopBottom:
    220. popupStartRect = CGRectMake((sourceSize.width - popupSize.width) / 2,
    221. -popupSize.height,
    222. popupSize.width,
    223. popupSize.height);
    224. break;
    225. default:
    226. popupStartRect = CGRectMake(sourceSize.width,
    227. (sourceSize.height - popupSize.height) / 2,
    228. popupSize.width,
    229. popupSize.height);
    230. break;
    231. }
    232. CGRect popupEndRect = CGRectMake((sourceSize.width - popupSize.width) / 2,
    233. (sourceSize.height - popupSize.height) / 2,
    234. popupSize.width,
    235. popupSize.height);
    236. // Set starting properties
    237. popupView.frame = popupStartRect;
    238. popupView.alpha = 1.0f;
    239. [UIView animateWithDuration:kPopupModalAnimationDuration delay:0.0f options:UIViewAnimationOptionCurveEaseOut animations:^{
    240. [self.mj_popupViewController viewWillAppear:NO];
    241. self.mj_popupBackgroundView.alpha = 1.0f;
    242. popupView.frame = popupEndRect;
    243. } completion:^(BOOL finished) {
    244. [self.mj_popupViewController viewDidAppear:NO];
    245. }];
    246. }
    247. - (void)slideViewOut:(UIView*)popupView sourceView:(UIView*)sourceView overlayView:(UIView*)overlayView withAnimationType:(MJPopupViewAnimation)animationType
    248. {
    249. // Generating Start and Stop Positions
    250. CGSize sourceSize = sourceView.bounds.size;
    251. CGSize popupSize = popupView.bounds.size;
    252. CGRect popupEndRect;
    253. switch (animationType) {
    254. case MJPopupViewAnimationSlideBottomTop:
    255. case MJPopupViewAnimationSlideTopTop:
    256. popupEndRect = CGRectMake((sourceSize.width - popupSize.width) / 2,
    257. -popupSize.height,
    258. popupSize.width,
    259. popupSize.height);
    260. break;
    261. case MJPopupViewAnimationSlideBottomBottom:
    262. case MJPopupViewAnimationSlideTopBottom:
    263. popupEndRect = CGRectMake((sourceSize.width - popupSize.width) / 2,
    264. sourceSize.height,
    265. popupSize.width,
    266. popupSize.height);
    267. break;
    268. case MJPopupViewAnimationSlideLeftRight:
    269. case MJPopupViewAnimationSlideRightRight:
    270. popupEndRect = CGRectMake(sourceSize.width,
    271. popupView.frame.origin.y,
    272. popupSize.width,
    273. popupSize.height);
    274. break;
    275. default:
    276. popupEndRect = CGRectMake(-popupSize.width,
    277. popupView.frame.origin.y,
    278. popupSize.width,
    279. popupSize.height);
    280. break;
    281. }
    282. [UIView animateWithDuration:kPopupModalAnimationDuration delay:0.0f options:UIViewAnimationOptionCurveEaseIn animations:^{
    283. [self.mj_popupViewController viewWillDisappear:NO];
    284. popupView.frame = popupEndRect;
    285. self.mj_popupBackgroundView.alpha = 0.0f;
    286. } completion:^(BOOL finished) {
    287. [popupView removeFromSuperview];
    288. [overlayView removeFromSuperview];
    289. [self.mj_popupViewController viewDidDisappear:NO];
    290. self.mj_popupViewController = nil;
    291. id dismissed = [self dismissedCallback];
    292. if (dismissed != nil)
    293. {
    294. ((void(^)(void))dismissed)();
    295. [self setDismissedCallback:nil];
    296. }
    297. }];
    298. }
    299. #pragma mark --- Fade
    300. - (void)fadeViewIn:(UIView*)popupView sourceView:(UIView*)sourceView overlayView:(UIView*)overlayView
    301. {
    302. // Generating Start and Stop Positions
    303. CGSize sourceSize = sourceView.bounds.size;
    304. CGSize popupSize = popupView.bounds.size;
    305. CGRect popupEndRect = CGRectMake((sourceSize.width - popupSize.width) / 2,
    306. (sourceSize.height - popupSize.height) / 2,
    307. popupSize.width,
    308. popupSize.height);
    309. // Set starting properties
    310. popupView.frame = popupEndRect;
    311. popupView.alpha = 0.0f;
    312. [UIView animateWithDuration:kPopupModalAnimationDuration animations:^{
    313. [self.mj_popupViewController viewWillAppear:NO];
    314. self.mj_popupBackgroundView.alpha = 0.5f;
    315. popupView.alpha = 1.0f;
    316. } completion:^(BOOL finished) {
    317. [self.mj_popupViewController viewDidAppear:NO];
    318. }];
    319. }
    320. - (void)fadeViewOut:(UIView*)popupView sourceView:(UIView*)sourceView overlayView:(UIView*)overlayView
    321. {
    322. [UIView animateWithDuration:kPopupModalAnimationDuration animations:^{
    323. [self.mj_popupViewController viewWillDisappear:NO];
    324. self.mj_popupBackgroundView.alpha = 0.0f;
    325. popupView.alpha = 0.0f;
    326. } completion:^(BOOL finished) {
    327. [popupView removeFromSuperview];
    328. [overlayView removeFromSuperview];
    329. [self.mj_popupViewController viewDidDisappear:NO];
    330. self.mj_popupViewController = nil;
    331. id dismissed = [self dismissedCallback];
    332. if (dismissed != nil)
    333. {
    334. ((void(^)(void))dismissed)();
    335. [self setDismissedCallback:nil];
    336. }
    337. }];
    338. }
    339. #pragma mark - Category Accessors
    340. #pragma mark --- Dismissed
    341. - (void)setDismissedCallback:(void(^)(void))dismissed
    342. {
    343. objc_setAssociatedObject(self, &MJPopupViewDismissedKey, dismissed, OBJC_ASSOCIATION_RETAIN);
    344. }
    345. - (void(^)(void))dismissedCallback
    346. {
    347. return objc_getAssociatedObject(self, &MJPopupViewDismissedKey);
    348. }
    349. @end

UIViewController+MJPopupViewController的更多相关文章

  1. iOS 在类别里添加成员变量的方法:objc_setAssociatedObject

    今天在github上查看MJPopupViewController这个项目,发现里面用到了objc_setAssociatedObject,用来为类别添加成员变量. 我百度之后,发现有人是这样说明的: ...

  2. OS快速开发必备

    github:https://github.com/koknine (终于改成以前的了) 当前移动互联网行业太火爆,移动端的需求日益增长,很多开发人员每天都应对着各种需求,作为一名iOS开发人员,对于 ...

  3. 不准使用xib自定义控制器view的大小

    1.AppDelegate.m // // 文 件 名:AppDelegate.m // // 版权所有:Copyright © 2018年 leLight. All rights reserved. ...

  4. UIViewController生命周期-完整版

    一.UIViewController 的生命周期 下面带 (NSObject)的方法是NSObject提供的方法.其他的都是UIViewController 提供的方法. load   (NSObje ...

  5. 拦截UIViewController的popViewController事件

    实现拦截UIViewController的pop操作有两种方式: 自定义实现返回按钮,即设置UIBarButtonItem来实现自定义的返回操作. 创建UINavigatonController的Ca ...

  6. iOS: 在UIViewController 中添加Static UITableView

    如果你直接在 UIViewController 中加入一个 UITableView 并将其 Content 属性设置为 Static Cells,此时 Xcode 会报错: Static table ...

  7. 8. UIViewController

    1. UIViewController 的认识 UIViewController在iOS开发中占据很重要的位置,iOS的整个UI开发的核心思想也是MVC的架构,从UIViewController的命名 ...

  8. 从一个控制器调到另一个控制器的[UIViewController _loadViewFromNibNamed:bundle:]崩溃

    一,现象和分析: 1.崩溃的主要地方是[UIViewController _loadViewFromNibNamed:bundle:] ,是从 A 控制器 push 到 B 控制器后, B 控制器的v ...

  9. UIViewController相关知识

    title: UIViewController 相关知识date: 2015-12-13 11:50categories: IOS tags: UIViewController 小小程序猿我的博客:h ...

随机推荐

  1. PIX v2版本中Query 失败时, ERR段的构造

    在ITI-9中描述PIX query事务的几个TestCase场景.其中有些是对于Query失败的描述. ERR 段包含Error location, Error code, Error code t ...

  2. [C++] 动态规划之矩阵连乘、最长公共子序列、最大子段和、最长单调递增子序列、0-1背包

    一.动态规划的基本思想 动态规划算法通常用于求解具有某种最优性质的问题.在这类问题中,可能会有许多可行解.每一个解都对应于一个值,我们希望找到具有最优值的解. 将待求解问题分解成若干个子问题,先求解子 ...

  3. 获取wifi热点

    https://stackoverflow.com/questions/31555640/how-to-get-wifi-ssid-in-ios9-after-captivenetwork-is-de ...

  4. 机器学习:多项式回归(scikit-learn中的多项式回归和 Pipeline)

    一.scikit-learn 中的多项式回归 1)实例过程 模拟数据 import numpy as np import matplotlib.pyplot as plt x = np.random. ...

  5. Mysql 5.6 MHA (gtid) on Kylin

    mha on Kylinip hostname repl role mha role192.168.19.69 mysql1 master node192.168.19.73 mysql2 slave ...

  6. 2015.12.12 DataGridveiw中添加checkbox列

    最简单的办法是通过DataTable来添加 DataTable中添加bool类型的列 dtpdf.Columns.Add("入库", typeof(bool)); DataRow ...

  7. 管理linked break-off snapshot

    1. 建立linked break-off snapshot   (1) 建立原卷 #> vxassist -g APS2_AFC_DG make vol1 4096000 #> vxpr ...

  8. k8s cookbook读书笔记 第二章

    走一遍概念 An overview of Kubernetes control f Working with pods f Working with a replication controller ...

  9. DAY4-函数进阶

    目录: 一.迭代器 二.生成器 三.面向过程编程 四.三元表达式.列表推导式.生成器表达式 五.第归与二分法 六.匿名函数 七.内置函数 练习 一.迭代器 一.迭代的概念 #迭代器即迭代的工具,那什么 ...

  10. 学习计划Python-转载

    作者:闲谈后链接:https://www.zhihu.com/question/29775447/answer/145395619来源:知乎著作权归作者所有,转载请联系作者获得授权. 不过需要说明的是 ...