6月14日 上海 OSC 源创会开始报名啦,有很多机械键盘送哦!!!用xcode模板向工程加入UIViewController sub class的时候,如果选中了with xib for interface,那么就会向工作加入三个文件(.h .m .xib), 这样生成的三个文件除后缀名后都是一样...
分类:
其他好文 时间:
2015-05-26 21:17:33
阅读次数:
207
UIViewController中关于nib初始化的函数- (id)initWithNibName:(NSString*)nibNameOrNil bundle:(NSBundle*)nibBundleOrNil;从这个函数的说明我们可以知道,如果你subclass一个UIViewControlle...
分类:
其他好文 时间:
2015-05-26 20:40:16
阅读次数:
153
UIKit框架中有各种Bar,UITabBar、UINavigationBar、UIToolbar。Bar对应的就有一些Item,tabBarItem、navigationItem、toolbarItems,再加上UIViewController、UINavigationController、UIT...
分类:
其他好文 时间:
2015-05-26 18:44:31
阅读次数:
128
//在iOS5.1?和?之前的版本中,?我们通常利用?shouldAutorotateToInterfaceOrientation:?来单独控制某个UIViewController的旋屏方向支持
-?(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrie...
分类:
移动开发 时间:
2015-05-26 01:40:31
阅读次数:
189
IOS8之后增加了UIAlertController类,它可以表示UIAlertView和UIActionSheet.它继承自UIViewController。- (BOOL)application:(UIApplication *)application didFinishLaunchingWit...
分类:
其他好文 时间:
2015-05-25 17:58:55
阅读次数:
176
iOS的UIViewController 类给我们提供了处理内存不足的接口。
在iOS 3.0 之前,当系统的内存不足时,UIViewController的didReceiveMemoryWarining 方法会被调用,我们可以在didReceiveMemoryWarining 方法里释放掉部分暂时不用的资源。
从iOS3.0 开始,UIViewController增加了vie...
分类:
移动开发 时间:
2015-05-25 10:13:27
阅读次数:
187
模式对话窗体跳转1、//模式对话窗体跳转- (void)presentViewController:(UIViewController *)viewControllerToPresent animated:(BOOL)flag completion:(void (^)(void))complet.....
分类:
其他好文 时间:
2015-05-24 00:11:00
阅读次数:
193
iOS 回到rootViewController根控制器视图直接上代码- (void)backToRootViewController{
UIViewController* vc = [MainViewController instance].navigationController.visibleViewController;
if ([vc isEqual:[MainViewCo...
分类:
移动开发 时间:
2015-05-21 22:37:30
阅读次数:
356
随着手指在屏幕上滑会实时显示一个红色框框,可以用来裁剪图片。新建一个UIView类继承于UIView,在里面进行绘图操作。在需要的UIViewController里实现代理方法即可。图片裁剪方法,以后会详细介绍,这里不做讲解。效果图和代码如下:
// MyView.h
// 头像编辑
// Created by Dong on 15/5/8.
//...
分类:
移动开发 时间:
2015-05-21 15:40:39
阅读次数:
231
首选创建一个新的项目,并添加一个MainViewController的Class文件打开MainViewController.h文件[cpp]view plaincopy @interfaceMainViewController:UIViewController @property(nonato.....
分类:
移动开发 时间:
2015-05-21 01:14:23
阅读次数:
334