[playButton setEnabled:YES]; NSError *playerError; AVAudioPlayer *audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[[[NSURL alloc] ...
分类:
其他好文 时间:
2014-08-13 14:31:26
阅读次数:
168
当一个视图控制器被创建,并在屏幕上显示的时候。 代码的执行顺序1、 alloc 创建对象,分配空间2、init (initWithNibName) 初始化对象,初始化数据3、loadView 从nib载入视图 ,通常这一步不需要去干涉。除非你...
分类:
移动开发 时间:
2014-08-12 21:28:44
阅读次数:
242
有时候开发中我们只需要年月日、或者只需要时分秒,刚开始由于对NSDate不是很熟悉,走了很多弯路,特在此记录!!回头要好好把NSDate的文档好好看看
NSDate *date = _datePickerView.date;
NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
// Get Current...
分类:
其他好文 时间:
2014-08-12 17:08:54
阅读次数:
172
博客园都不知道怎么外链图片……- (void)numToString:(double)num{ int iLen,iNum,iAddZero=0; NSMutableString *szChMoney = [[NSMutableString alloc] init]; NSArra...
分类:
其他好文 时间:
2014-08-11 20:47:32
阅读次数:
196
UITableView设置背景图片:即设置tableView的backgroundViewUIView *view = [[UIView alloc] init]; view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imag...
分类:
其他好文 时间:
2014-08-11 20:40:52
阅读次数:
192
用处:实现一个web浏览器,加载静态html,动态url,调用js//加载动态urlself.webView = [[UIWebView alloc]initWithFrame:self.view.bounds];NSString *str = @"http://www.baidu.com";NSU...
分类:
Web程序 时间:
2014-08-11 17:16:32
阅读次数:
237
1.
NSThread *thread=[[NSThread alloc] initWithTarget:self selector:@selector(saleTicketMethod:) object:@"线程--1"];...
分类:
移动开发 时间:
2014-08-11 15:03:12
阅读次数:
243
UIAlertView使用
基本用法
// 创建一个UIAlertView并显示出来
UIAlertView *alertview = [[UIAlertView alloc] initWithTitle:aTitle message:msg delegate:nil cancelButtonTitle:str otherButtonTitles:nil];
[alertview show];...
分类:
其他好文 时间:
2014-08-11 10:07:51
阅读次数:
202
侯捷翻译的《STL源码剖析》stl_alloc.h阅读笔记。讲解的内存的配置与释放。...
分类:
其他好文 时间:
2014-08-11 00:20:11
阅读次数:
290
- (NSString *)getCarrier { NSString *strCarrier = nil; CTTelephonyNetworkInfo *networkInfo = [[CTTelephonyNetworkInfo alloc] init]; CT...
分类:
其他好文 时间:
2014-08-11 00:09:31
阅读次数:
294