1 //dismiss到根视图 2 - (void)dismissToRootViewController{ 3 UIViewController *vc = self; 4 while (vc.presentingViewController) { 5 vc = vc.presentingView... ...
分类:
其他好文 时间:
2018-06-13 16:33:25
阅读次数:
190
-(void)jumpVC:(UIViewController *)vc{ NSArray *vcs = self.navigationController.viewControllers; NSMutableArray *newVCS = [NSMutableArray array]; if ([ ...
分类:
移动开发 时间:
2018-05-30 13:19:23
阅读次数:
751
//uiview的扩展 extension UIView{ func getFirstViewController()->UIViewController?{ for view in sequence(first: self.superview, next: {$0?.superview}){ if ...
分类:
编程语言 时间:
2018-05-29 22:53:25
阅读次数:
369
- (void)presentViewController:(UIViewController *)viewControllerToPresent animated:(BOOL)flag completion:(void (^)(void))completion 这种方式一般出现在需要使用者完成某件 ...
分类:
其他好文 时间:
2018-05-29 20:33:43
阅读次数:
170
方法一:设置BarButtonItem的文本样式为透明颜色,代码如下: 此外这种方法会导致title不能居中,被偏移很多,如下所示(虽然不被显示,也占了导航栏左边很大一部分位置) 方法二:给UIViewController添加类别,然后在load方法里面用Method Swzilling方法替换 交 ...
分类:
移动开发 时间:
2018-05-04 18:21:03
阅读次数:
243
在UIViewController中收起键盘,有四种代码方式: 1、让相应的控件放弃第一响应者 2、点击UIViewController的任意地方,就可以收起键盘 3、当获取当前UIViewController比较困难时,使用UIApplication的放弃第一响应者方法 4、当获取当前UIView ...
分类:
移动开发 时间:
2018-04-27 12:16:50
阅读次数:
171
1 2 3 4 5 6 7 8 9 func rootViewCon() -> UIViewController { var topVC = UIApplication.shared.keyWindow?.rootViewController while topVC?.presentedViewCo ...
分类:
移动开发 时间:
2018-03-12 10:24:52
阅读次数:
246
XYRouter https://github.com/uxyheaven/XYRouter XYRouter是一个通过url routing来解决UIViewController跳转依赖的类. * 本类採用ARC Installation 本库基于ARC 拷贝XYQuick到项目里 在须要用的文件 ...
分类:
Web程序 时间:
2018-03-07 19:07:37
阅读次数:
240
1 import UIKit 2 3 class ViewController: UIViewController, UIPageViewControllerDelegate, UIPageViewControllerDataSource { 4 5 @IBOutlet weak var redBt... ...
分类:
编程语言 时间:
2018-02-24 15:10:28
阅读次数:
267
<欢迎大家加入iOS开发学习交流群:QQ529560119> /* UIViewController is a generic controller base class that manages a view. It has methods that are called when a view ...