一、最普通的视图控制器UIViewContoller 一个普通的视图控制器一般只有模态跳转的功能(ipad我不了解除外,这里只说iPhone),这个方法是所有视图控制器对象都可以用的,而实现这种功能,有两种方法。 1、通过方法 - (void)presentViewController:(UIVie ...
分类:
移动开发 时间:
2016-05-26 20:36:31
阅读次数:
380
通过UIView对象获取该对象所属的UIViewController可以使用UIResponder的nextResponder方法获得,UIView类继承于UIResponder,因此可以直接使用。 根据文档描述,如果View有view controller,则通过nextResponder方法返回 ...
分类:
其他好文 时间:
2016-05-26 10:19:46
阅读次数:
116
每个事件对应一个UITouch,继承UIResponse的类(UIView,UIViewController)都能响应事件,实现Touch的代理即可对事件做出处理 每个事件产生后都会保存在UIApplication的事件队列中,事件的传递是取第一个事件从父控件传递到子控件。 关于找到最合适的控件处理 ...
分类:
其他好文 时间:
2016-05-23 15:02:43
阅读次数:
127
1 #pragma mark - 获取当前屏幕显示的viewcontroller 2 - (UIViewController *)getCurrentVC 3 { 4 UIViewController *result = nil; 5 6 UIWindow * window = [[UIApplic ...
分类:
其他好文 时间:
2016-05-22 18:09:32
阅读次数:
195
加入两张图片和mav声音的文件 @interface ViewController : UIViewController@property (weak,nonatomic) IBOutlet UIImageView *imageView;@end .m文件 #import "ViewControll ...
分类:
其他好文 时间:
2016-05-20 11:46:35
阅读次数:
154
UINavigationController类方法跳转窗口: - (void)showViewController:(UIViewController *)vc sender:(id)sender - (void)pushViewController:(UIViewController *)view ...
分类:
其他好文 时间:
2016-05-19 16:32:09
阅读次数:
182
#import <UIKit/UIKit.h>@interface ViewController : UIViewController@property (weak,nonatomic)IBOutlet UIButton *startBtn;@property (weak,nonatomic)IBO ...
分类:
其他好文 时间:
2016-05-18 17:35:36
阅读次数:
135
Part One 别人问你你都感觉这尼玛说啥的基础面试题 1.UIWindow和UIView和 CALayer 的联系和区别? 答:UIView是视图的基类,UIViewController是视图控制器的基类,UIResponder是表示一个可以在屏幕上响应触摸事件的对象; UIwindow是UIV ...
分类:
移动开发 时间:
2016-05-18 12:26:39
阅读次数:
230
一,效果图。 二,工程图。 三,代码。 RootViewController.h #import <UIKit/UIKit.h> @interface RootViewController : UIViewController <UIScrollViewDelegate> { UIView *bac ...
分类:
其他好文 时间:
2016-05-18 09:14:14
阅读次数:
294
项目概述: 1.项目有UITabBarController管理多个UINavigationController,每个UINaviagitionController分管多个UIViewController; 2.项目由多人开发,为不相互干扰使用多个UIStoryboard; 项目需求: 1.工程中只有 ...
分类:
其他好文 时间:
2016-05-17 13:14:54
阅读次数:
201