1、UIScrollView下图片的捏合放大和缩小,我们直接用scrollView自带的属性就可以了,这个没什么好说,我们直接贴代码:[plain] view plaincopy//控制器 theScroll=[[UIScrollView alloc] initWithFrame:frame];.....
分类:
其他好文 时间:
2014-08-19 14:19:54
阅读次数:
170
// 创建时间选择器 UIDatePicker *picker = [[UIDatePicker alloc] init]; // 设置时间格式为只显示日期 picker.datePickerMode = UIDatePickerModeDate; // 显示中文 ...
分类:
其他好文 时间:
2014-08-18 20:12:12
阅读次数:
266
当使用 initWithNibName 函数, 并使用 由nib文件生成的ViewController 的view属性时候,遇到这个问题。UIViewController * UIVC = [[UIViewController alloc] initWithNibName:@"loc" bundle...
分类:
其他好文 时间:
2014-08-18 18:01:22
阅读次数:
202
UIlabel本身没有下划线的属性,使用绘制的方法,添加下滑下,并且赋给该label一个action作为响应方法,实现DIY超链接的效果。//调用#import "UnderLineLabel.h" UnderLineLabel *label = [[UnderLineLabel alloc] in...
分类:
其他好文 时间:
2014-08-18 15:50:22
阅读次数:
201
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon.png"]]; // 会缓存图片UIImageView *imageView= [[UIImageView alloc] in...
分类:
其他好文 时间:
2014-08-18 12:11:54
阅读次数:
232
四,关于语义特性copy和与alloc对应的dealloc以及初始化操作和便利构造器的补充1,语义特性copy如果想对一个对象进行copy操作,对象的类必须服从一个NSCopying协议,并且实现协议中的方法copyWithZone:,方法为(仍以Person类为例):-(id)copyWithZone:(NSZone*)zone{NSString*newSex=..
分类:
其他好文 时间:
2014-08-18 09:20:44
阅读次数:
238
iOS NSString的常用用法 //1、创建常量字符串。NSString *astring = @"This is a String!"; //2、创建空字符串,给予赋值。NSString *astring = [[NSString alloc] init]; astring = @"This ...
分类:
移动开发 时间:
2014-08-17 23:59:33
阅读次数:
483
/**导航控制器掌握:1.创建导航控制器UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:self.viewController];2.zhan (zhan 中所有的子控制...
分类:
移动开发 时间:
2014-08-17 21:11:42
阅读次数:
210
iOS开发UI篇—popoverController使用注意一、设置尺寸提示:不建议,像下面这样吧popover的宽度和高度写死。 1 //1.新建一个内容控制器 2 YYMenuViewController *menuVc=[[YYMenuViewController alloc]init...
分类:
移动开发 时间:
2014-08-17 21:09:32
阅读次数:
389
1.NSArray 是一个父类,NSMUtableArray是其子类,他们构成了OC的数组。2.NSArray的创建NSArray * array = [[NSArray alloc]initWithObjects:@"one",@"two",@"three",@"four good",nil];/...
分类:
其他好文 时间:
2014-08-16 01:01:09
阅读次数:
209