关于 iOS启动图的一些发现
来源:互联网 发布:python md5加密文件 编辑:程序博客网 时间:2024/05/21 10:27
最近看一个外文技术文章以及demo
提到一种实现,即:
自定义一个控制器R,这个控制器作为window的根控制器;
然后自定义一个控制器S,这个控制器作为启动图控制器,并且作为控制器R的子控制器;
然后自定义一个导航栏控制器(或者标签栏控制器)NB,这个控制器作为控制器R的子控制器过渡切换的目标子控制器,在这个
/*
This method can be used to transition between sibling child view controllers. The receiver of this method is
their common parent view controller. (Use [UIViewController addChildViewController:] to create the
parent/child relationship.) This method will add the toViewController's view to the superview of the
fromViewController's view and the fromViewController's view will be removed from its superview after the
transition completes. It is important to allow this method to add and remove the views. The arguments to
this method are the same as those defined by UIView's block animation API. This method will fail with an
NSInvalidArgumentException if the parent view controllers are not the same as the receiver, or if the
receiver explicitly forwards its appearance and rotation callbacks to its children. Finally, the receiver
should not be a subclass of an iOS container view controller. Note also that it is possible to use the
UIView APIs directly. If they are used it is important to ensure that the toViewController's view is added
to the visible view hierarchy while the fromViewController's view is removed.
*/
- (void)transitionFromViewController:(UIViewController *)fromViewController toViewController:(UIViewController *)toViewController duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options animations:(void (^ __nullable)(void))animations completion:(void (^__nullable)(BOOL finished))completionNS_AVAILABLE_IOS(5_0);
>>>>>>>>>>
Transitions between two of the view controller's child view controllers.
This method adds the second view controller's view to the view hierarchy and then performs the animations defined in your animations block. After the animation completes, it removes the first view controller's view from the view hierarchy.
This method is only intended to be called by an implementation of a custom container view controller. If you override this method, you must call super
in your implementation.
方法中的options
typedef NS_OPTIONS(NSUInteger, UIViewAnimationOptions) {
UIViewAnimationOptionLayoutSubviews = 1 << 0,
UIViewAnimationOptionAllowUserInteraction = 1 << 1,// turn on user interaction while animating
UIViewAnimationOptionBeginFromCurrentState = 1 << 2,// start all views from current value, not initial value
UIViewAnimationOptionRepeat = 1 << 3,// repeat animation indefinitely
UIViewAnimationOptionAutoreverse = 1 << 4,// if repeat, run animation back and forth
UIViewAnimationOptionOverrideInheritedDuration = 1 << 5,// ignore nested duration
UIViewAnimationOptionOverrideInheritedCurve = 1 << 6,// ignore nested curve
UIViewAnimationOptionAllowAnimatedContent = 1 << 7,// animate contents (applies to transitions only)
UIViewAnimationOptionShowHideTransitionViews = 1 << 8,// flip to/from hidden state instead of adding/removing
UIViewAnimationOptionOverrideInheritedOptions = 1 << 9,// do not inherit any options or animation type
UIViewAnimationOptionCurveEaseInOut = 0 <<16,// default
UIViewAnimationOptionCurveEaseIn = 1 <<16,
UIViewAnimationOptionCurveEaseOut = 2 <<16,
UIViewAnimationOptionCurveLinear = 3 <<16,
UIViewAnimationOptionTransitionNone = 0 <<20,// default
UIViewAnimationOptionTransitionFlipFromLeft = 1 <<20,
UIViewAnimationOptionTransitionFlipFromRight = 2 <<20,
UIViewAnimationOptionTransitionCurlUp = 3 <<20,
UIViewAnimationOptionTransitionCurlDown = 4 <<20,
UIViewAnimationOptionTransitionCrossDissolve = 5 <<20,
UIViewAnimationOptionTransitionFlipFromTop = 6 <<20,
UIViewAnimationOptionTransitionFlipFromBottom = 7 <<20,
} NS_ENUM_AVAILABLE_IOS(4_0);决定切换的方式
- 关于 iOS启动图的一些发现
- 关于 iOS启动图控制器的一些发现 姿势
- 发现的一些关于python的文章
- 关于Spring整合发现的一些问题。
- 关于Spring整合发现的一些问题。
- 关于二值化函数cvAdaptiveThreshold的一些发现
- 关于angular2更新时机的一些发现
- STM32关于RTC的一些有意思的发现
- 关于Excel中的一些发现
- iOS 升级Xcode7发现的一些问题和解决方案
- IOS对于多线程NSOperation方式的一些发现.
- 关于dll输出函数被编译器改名的一些发现
- 关于二值化函数cvAdaptiveThreshold和cvThreshold的一些发现
- 关于二值化函数cvAdaptiveThreshold和cvThreshold的一些发现
- 关于IOS的一些知识
- 一些关于IOS的网站
- 关于iOS的一些问题
- 关于iOS 的一些总结
- Java中格式化float类型变量
- 解题报告:HDU4549 M斐波那契数列 数论三大基础(快速幂+矩阵快速幂+费马小定理)
- 机器人奇异性 & 奇异区域的判断 make&test
- 响应式布局
- 非集中访问控制技术基础
- 关于 iOS启动图的一些发现
- KVC/KVO
- CS231n 学习笔记(4)——神经网络 part4 :BP算法与链式法则
- sg函数_____A Chess Game( hdu 2425 )
- 欢迎使用CSDN-markdown编辑器
- iOS 日志工具
- 淘淘商城---8.8
- MVC请求处理流程
- linux系统中多种方式设置全局变量(java 环境变量配置)