-(IBAction)abc:(id)sender{ NSString *a = @"abcdef"; NSMutableString *newA = [[NSMutableString alloc]init]; int length = a.length; for (int i = 0; ...
分类:
其他好文 时间:
2014-07-06 23:22:46
阅读次数:
210
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ self.window = [[[UIWindow alloc] init...
分类:
移动开发 时间:
2014-07-06 23:04:31
阅读次数:
270
#pragma mark 发微博界面:sendStatus-(void)sendStatus{ if ([self.textView.text isEqualToString:@""]) { UIAlertView *alter = [[UIAlertView alloc...
分类:
其他好文 时间:
2014-07-06 22:34:00
阅读次数:
293
1 //创建tableView UITableView *myTable =[[UITableView alloc]initWithFrame:CGRectMake(0, 0, 0, 0) style:UITableViewStylePlain]; myTable.backgroundCol...
分类:
其他好文 时间:
2014-07-06 21:11:09
阅读次数:
147
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ self.window = [[UIWindow alloc] initW...
分类:
移动开发 时间:
2014-07-06 15:36:26
阅读次数:
366
最近对内存管理,有了一些新的认识,以前只知道alloc,或者retain,或者copy,之后需要release或者autorelease;
只知其一,但是在工作学习中仅仅知道这些是不够用的,还需要知道属性等内部的内存存管理才行.
@property (readwrite,nonatomic,assign)NSInteger age;
@property (readwrite,no...
分类:
其他好文 时间:
2014-07-04 09:31:10
阅读次数:
354
NSThread:利用NSThread创建和启用一个线程1.NSThread *thread = [[NSThread alloc] initWithTarget:self selector:@selector(run) object:nil];,调用后调用[thread start];2.创建.....
分类:
移动开发 时间:
2014-07-03 19:12:31
阅读次数:
223
NSThread一.创建和启动线程1.开线程的几种方式1)先创建线程,后启动NSThread *thread = [[NSThread alloc] initWithTarget:self selector:@selector(run) object:nil];[thread start];2)创建...
分类:
移动开发 时间:
2014-07-03 12:58:28
阅读次数:
207
从 Objective-C 里的 Alloc 和 AllocWithZone 谈起Creative Commons 共享创意许可,转载请注明来源一、问题起源一切起源于Apple官方文档里面关于单例(Singleton)的示范代码:Creating a Singleton Instance.主要的.....
分类:
其他好文 时间:
2014-07-02 17:12:50
阅读次数:
364
首先用下面四张图,说明我要实现的功能。【讲一张图片复制到另外一个UIimageView上】
实现代码如下:
-(IBAction)panGestureTop:(UILongPressGestureRecognizer *)longPress
{
UIMenuItem * itemPase = [[UIMenuItem alloc] initWithTitle:@"复...
分类:
其他好文 时间:
2014-07-02 15:18:54
阅读次数:
211