
iphone
文章平均质量分 74
gzlle25
这个作者很懒,什么都没留下…
展开
-
【iphone】在程序中调用摄像头
<br />调用摄像头<br /> <br />UIImagePickerController *picker = [[UIImagePickerController alloc] init]; if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { picker.sourceType = UIImagePickerControllerS原创 2011-03-11 10:48:00 · 1045 阅读 · 0 评论 -
让UILabel的高度随内容多少自动变化
CGRect screenRect = [[UIScreen mainScreen] applicationFrame]; UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, screenRect.size.width, 0)]; label.text = self.content; label.numberOfLines = 0; label.lineBreakMode =原创 2011-02-22 17:52:00 · 782 阅读 · 0 评论 -
转:iphone开发中的一些小技巧
<br />经过半年多的iphone开发,我发现在开发过程中最难的就是一些嘈杂的细节,而了解一些小技巧就会达到事半功倍的效果,下面我就总结一下在iphone开发中的一些小技巧。 1、如果在程序中想对某张图片进行处理的话(得到某张图片的一部分)可一用以下代码:<br />UIImage *image = [UIImage imageNamed:filename];<br />CGImageRef imageRef = image.CGImage;<br />CGRect rect = CGRectMake(o原创 2011-02-22 17:55:00 · 294 阅读 · 0 评论