码迷,mamicode.com
首页 >  
搜索关键字:alloc    ( 3259个结果
IOS7下,alertView不能使用addSubview添加textField解决办法
UIAlertView *alertView1 = [[UIAlertView alloc] initWithTitle:@"Enter Form Name" message:@"" ...
分类:移动开发   时间:2014-09-09 15:39:58    阅读次数:148
ios中的自动释放池
自动释放池中是否有虑重功能1 @autoreleasepool {2 UIView *view = [UIView alloc] init] autorelease];3 [view autorelease];4 }这样写在自动释放池的队列中是两个对象还是一个对象,就...
分类:移动开发   时间:2014-09-09 11:54:18    阅读次数:226
[IOS UIalert模版]
1.alertview创建UIAlertView *alert; alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"题库有更新,需要更新吗?" delegate:self cancelButtonTitle:@"确定"...
分类:移动开发   时间:2014-09-09 10:35:58    阅读次数:212
[IOS 同步GET和POST数据的模版]
1.同步GET (联网检测)+(BOOL)checkConnect{ // 初始化请求 NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init]; NSString *url=[NSString st...
分类:移动开发   时间:2014-09-09 10:27:48    阅读次数:332
AppleScript in Cocoa
NSString *path = [[NSBundle mainBundle] pathForResource:@"××××" ofType:@"scpt"];NSAppleScript *script = [[NSAppleScript alloc] initWithContentsOfURL:[...
分类:移动开发   时间:2014-09-05 17:51:51    阅读次数:225
简单?工?厂模式 (Simple Factory Pattern)
@interface ViewController (){ Shape *_shape;}@end@implementation ViewController- (void)loadView{ //设置画板 self.view=[[SimpleDrawBoard alloc]ini...
分类:其他好文   时间:2014-09-04 22:13:40    阅读次数:245
iOS 汉字转拼音
NSMutableString *ms = [[NSMutableString alloc] initWithString:@"我是中国人"]; if (CFStringTransform((__bridge CFMutableStringRef)ms, 0, kCFStringTransformMandarinLatin, NO)) { NSLog(@"P...
分类:移动开发   时间:2014-09-04 20:59:20    阅读次数:205
iOS拨打电话并且能返回当前应用的方法
UIWebView*callWebview =[[UIWebView alloc] init]; NSString *telUrl = [NSString stringWithFormat:@"tel:%@",phone]; NSURL *telURL =[NSURL URLWithString:telUrl]; [callWebview loadRequest:[NSURLRequest req...
分类:移动开发   时间:2014-09-04 20:58:20    阅读次数:215
NSDate使用
一、将字符串时间转化为NSDate,并打印1 NSString *string = @"2013-08-12 20:13:43";2 3 NSDateFormatter *formatter = [[NSDateFormatter alloc] in...
分类:其他好文   时间:2014-09-04 16:46:39    阅读次数:177
【OC学习-11】ARC和内存管理里面的alloc、assign、new、retain、copy、mutableCopy、release说明
一般我们在开发程序时,只管alloc,不需要管release,因为有ARC帮我们管理。但是在学习时仍需要了解:内存是有限的,在堆区分配了内存后,如果不需要,则要回收,不然内存不够引起崩溃。...
分类:其他好文   时间:2014-09-03 19:52:47    阅读次数:229
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!