摘要: 作者: sqw0312 1 随机数的使用 头文件的引用 #import time.h #import mach/mach_time.h srandom() 的使用 srandom((unsigned)(mach_absolute_time() 0xFFFFFFFF)); 直接使用 random() 来调用随机数 2 在UIImageView 中旋转图作者:sqw03121 随机数的使用头文件的引用#import <time.h>#import <mach/mach_time.h>srandom()的使用srandom((unsigned)(mach_absolute_t 阅读全文
posted @ 2012-10-26 13:40 hhhker 阅读(406) 评论(0) 推荐(0) 编辑
摘要: 可以在toolBar上添加任何View。其实它的原理是把你要添加的View先加到UIBarButtonItem里面,最后再把UIBarButtonItem数组一次性放到toolbar的items里面。toolBar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 320, 44)]; toolBar.barStyle = UIBarStyleDefault; UIBarButtonItem *titleButton = [[UIBarButtonItem alloc] initWithTitle:title ... 阅读全文
posted @ 2012-10-26 11:13 hhhker 阅读(5583) 评论(0) 推荐(0) 编辑
摘要: 开发者论坛和资料站点1.http://www.cocoachina.com/ 我基本把他归为eoe一样常用级别。2.http://www.apple.com.cn/developer/ 这个就不解释了,英语好的可以去掉cn,不过目前我还用的比较少,官方文档和指引3.http://code4app.com/ 提供一些常用的自定义控件等等的源码,还不错4.http://www.devdiv.com/ios.html 感觉好像改版了~~5.http://www.cocoachina.com/iphonedev/toolthain/2011/1109/3480.html cocoa上一个资源索引视频和 阅读全文
posted @ 2012-10-18 15:25 hhhker 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 这边我就以最简单的例子来引入几个常用的API中的类。[cpp]//// NLViewController.m// NetWorkTest//// Created by Nono on 12-5-16.// Copyright (c) 2012年 NonoWithLilith. All rights reserved.//#import "NLViewController.h"@interface NLViewController ()@end@implementation NLViewController@synthesize label = _label;@synthes 阅读全文
posted @ 2012-10-18 14:37 hhhker 阅读(8204) 评论(0) 推荐(0) 编辑
摘要: 在做IOS开发时,经常用到到plist文件, 那plist文件是什么呢? 它全名是:Property List,属性列表文件,它是一种用来存储串行化后的对象的文件。属性列表文件的扩展名为.plist,因此通常被称为plist文件。文件是xml格式的。Plist文件通常用于储存用户设置,也可以用于存储捆绑的信息我们创建一个项目来学习plist文件的读写。1、创建项目Plistdemo项目创建之后可以找到项目对应的plist文件,打开如下图所示:在编辑器中显示类似与表格的形式,可以在plist上右键,用源码方式打开,就能看到plist文件的xml格式了。2、创建plist文件。按command + 阅读全文
posted @ 2012-10-18 14:20 hhhker 阅读(1696) 评论(0) 推荐(0) 编辑
摘要: 目 录引言 1一、安装和登录 2(一) login 2(二) shutdown 2(三) halt 3(四) reboot 3(五) install 4(六) mount 4(七) umount 6(八) chsh 6(九) exit 7(十) last 7(十一) 动手练习 7二、文件处理 9(一) file 9(二) mkdir 9(三) grep 10(四) dd 11(五) find 11(六) mv 13(七) ls 13(八) diff 14(九) cmp 15(十) cat 15(十一) ln 16(十二) 动手练习 16三、系统管理 18(一) df 18(二) top 19( 阅读全文
posted @ 2012-10-17 16:33 hhhker 阅读(57978) 评论(0) 推荐(8) 编辑
摘要: http://kqwd.blog.163.com/blog/static/4122344820117191351263/ 阅读全文
posted @ 2012-10-17 15:41 hhhker 阅读(163) 评论(0) 推荐(0) 编辑
摘要: http://www.codeios.com/thread-1054-1-1.html 阅读全文
posted @ 2012-10-16 17:22 hhhker 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 多线程之NSInvocationOperation多线程编程是防止主线程堵塞,增加运行效率等等的最佳方法。而原始的多线程方法存在很多的毛病,包括线程锁死等。在Cocoa中,Apple提供了NSOperation这个类,提供了一个优秀的多线程编程方法。本次介绍NSOperation的子集,简易方法的NSInvocationOperation:@implementation MyCustomClass- (void)launchTaskWithData:(id)data{ //创建一个NSInvocationOperation对象,并初始化到方法 //在这里,selector参数后的值是你想在另外 阅读全文
posted @ 2012-10-12 16:49 hhhker 阅读(5054) 评论(0) 推荐(0) 编辑
摘要: http://code4app.com/ios/Popup-Calendar/5008d41e6803faea0e000000 阅读全文
posted @ 2012-09-18 09:10 hhhker 阅读(183) 评论(0) 推荐(0) 编辑