- (void)loadAssets {
// Initialise
_assets = [NSMutableArray new];
_assetLibrary = [[ALAssetsLibrary alloc] init];
// Run in the background as it takes a while to get a...
分类:
其他好文 时间:
2014-06-05 12:06:55
阅读次数:
215
//初始化:UIActivityIndicatorView* indicator =
[[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0, 0, 50,
50)];//设置显示样式,见UIActivityIndicatorViewS...
分类:
其他好文 时间:
2014-06-04 21:58:49
阅读次数:
272
在Linux中,进程的创建由系统调用fork和vfork完成。它们生成一个子进程并且子进程是父进程的一个复制品。Fork系统调用对应的kernel函数是sys_fork,此函数简单的调用kernel函数do_fork。一个简化版的do_fork执行如下:(1)alloc_pid()。给新的进程分配一...
分类:
系统相关 时间:
2014-06-02 19:04:43
阅读次数:
355
点击按钮后弹出图片库选择图片,然后返回给Button的image。-
(IBAction)selectIcon { UIImagePickerController *imagePicker =
[[UIImagePickerController alloc]init]; //设置图库源 ...
分类:
其他好文 时间:
2014-05-30 18:07:54
阅读次数:
322
UISearchBar控件就是要为你完成搜索功能的一个专用控件。它集成了很多你意想不到的功能和特点!首先,还是来普及一下UISearchBar控件API相关的属性和方法吧!UISearchBar属性相关_searchBar
= [[UISearchBar alloc] initWithFrame:C...
分类:
其他好文 时间:
2014-05-30 11:40:29
阅读次数:
300
一、可以通过代码的方式创建UIButton1、通用实例化对象方法:UIButton *button =
[[UIButton alloc] initWithFrame:rect];2、快速实例化对象方法:UIButton *button = [UIButton
buttonWithType:UIBu...
分类:
其他好文 时间:
2014-05-29 19:11:52
阅读次数:
360
一、UILabel常用属性1——实例化和设置文字// 实例化UILabel并指定其边框UILabel
*label = [[UILabel alloc]initWithFrame:CGRectMake(0.0, 210.0, 320.0, 40.0)];//
设置label显示的文本[label s...
分类:
其他好文 时间:
2014-05-29 18:14:03
阅读次数:
206
前文我们已经说了内存管理的原则:只要出现了new alloc retain
,就一定会配对出现一个release,autorelease那么当我一个对象被释放之后,如果我们再次调用这个对象的方法(包括这个对象的retain
release方法),将会出现 野指针 错误,在xcode中具体表现为EXC...
分类:
其他好文 时间:
2014-05-28 17:05:55
阅读次数:
259
单例的模式在网上有很多,今天发下我个人对单例模式的理解。整个app中只存在一个实例,也只会进行一次实例,在实例完成之后是不可以人释放的(当App关闭之后,等系统自己回收)。也就是说,如果我们写得某个类符合了上述条件,那么我们也可以称这个类为单例。
在非ARC的工程中,我们需要针对alloc,r...
分类:
移动开发 时间:
2014-05-27 15:59:11
阅读次数:
309
UIAlertView
1.Title
获取或设置UIAlertView上的标题。
2.Message
获取或设置UIAlertView上的消息
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Title" message:@"message" delegate:self cancelBu...
分类:
其他好文 时间:
2014-05-25 16:37:56
阅读次数:
194