【转】:http://www.oschina.net/code/snippet_2247606_39106获取IOS设备的型号//获得设备型号+ (NSString *)getCurrentDeviceModel:(UIViewController *)controller{ int mib[...
分类:
移动开发 时间:
2014-10-27 14:17:56
阅读次数:
140
转自:http://blog.csdn.net/dqjyong/article/details/17896145IOS7中,不仅应用的风格有一定的变化,状态栏变化比较大,我们可以看到UIVIEWCONTROLLER的状态栏与导航栏基本是一体的。因此UIVIEWCONTROLLER的HIDE/SHOW...
分类:
移动开发 时间:
2014-10-26 22:29:29
阅读次数:
155
ViewController.h
#import
@interface ViewController : UIViewController
{
UIImage *_image;
NSInteger _index;
}
@endViewController.m
#import "ViewController.h"
#import "Person.h"
@interface...
分类:
其他好文 时间:
2014-10-23 14:26:57
阅读次数:
161
-普通选择器必须满足这两个协议,一个为委托协议,一个为数据源协议
-委托协议负责控制控件UI、事件响应,
实现可选
-数据源协议负责控件与应用数据模型的桥梁,一般必须实现
@interface ViewController : UIViewController
//
// ViewController.h
// PickViewSample
//
// ...
分类:
移动开发 时间:
2014-10-23 00:05:35
阅读次数:
243
效果图:代码:RootViewController.h#import #import @interface RootViewController : UIViewController{ //存放歌曲数组 NSMutableArray *musicArray; //名字所在的labe...
分类:
其他好文 时间:
2014-10-21 23:12:49
阅读次数:
324
开始时候的效果图:点击增加时候的效果图:点击减少时候的效果图:ReaderViewController.h#import @interface ReaderViewController : UIViewController{ UIScrollView *scrollView;}@propert...
分类:
移动开发 时间:
2014-10-21 19:23:49
阅读次数:
211
控制器的view是延迟加载的:用到时再加载
可以用isViewLoaded方法判断一个UIViewController的view是否已经被加载
控制器的view加载完毕就会调用viewDidLoad方法.
控制器的view加载流程如下图:...
分类:
其他好文 时间:
2014-10-21 17:46:17
阅读次数:
114
初始的图:左滑,或划的效果图:工程文件:MainViewController.h#import @interface MainViewController : UIViewController@endMainViewContoller.m#import "MainViewController.h"/...
分类:
其他好文 时间:
2014-10-21 15:19:05
阅读次数:
167
开始效果图:点击button后效果图:工程目录:工程详细目录:RootViewController.h#import //加入头文件#import "DCPathButton.h"@interface RootViewController : UIViewController@endRootView...
分类:
其他好文 时间:
2014-10-21 13:39:27
阅读次数:
169
1.响应者对象iOS中不是任何对象都能处理事件,只有继承了UIResponder的对象才能接收并处理事件,我们称之为“响应者对象”。UIApplication、UIViewController、UIView都继承自UIResponder,因此他们都是响应者对象,都能够接收并处理事件。2.UIResp...
分类:
移动开发 时间:
2014-10-20 22:59:51
阅读次数:
353