摘要: came from:http://qing.weibo.com/tj/5d4a5ca3330010rw.html关于变量的作用域@protected—Methods defined in the class and any subclasses can directly access the instance variables that follow.This is the default case.该类和所有的子类中的方法可以直接访问这样的变量,这是默认的。@private—Methods defined in the class can directly access the insta 阅读全文
posted @ 2012-05-10 16:30 印错版的RMB 阅读(699) 评论(0) 推荐(0) 编辑
摘要: came from:http://marshal.easymorse.com/tech/objc-%E4%BD%BF%E7%94%A8kvcKVC是什么?即:Key-Value Coding,直译是:键值编码。还是没明白什么意思?先看看下面的代码。Book类的代码,头文件:#import <Foundation/Foundation.h>@interface Book : NSObject { NSString *name;}@end实现文件:#import "Book.h"@implementation Book@end这个Book类太简单了,只有一个实例变量 阅读全文
posted @ 2012-05-10 15:32 印错版的RMB 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 本文转自:www.cppblog.com/zhangyuntaoshe/articles/122787.htmlUIImage其实,UIImageVIew为UIImage的视图容器.3.UIImage 与UIImageView的重要属性:UIImage:重要属性:sizeimageOrientation重要方法:+imageNamed:+imageWithData:drawAtPoint:drawAtPoint:blendMode:alpha:drawInRect:drawInRect:blendMode:alpha:UIImageView:重要属性:imageanimationImages重 阅读全文
posted @ 2012-02-03 15:00 印错版的RMB 阅读(553) 评论(0) 推荐(0) 编辑
摘要: 转至:http://www.wuleilei.com/blog/189最近几个月一直都在做iPhone项目,至于持续到什么时候还不得而知,所以就只能写iPhone的开发日记了,呵呵,不懂的盆友可以飘过哈~今天是转载的一片老外用Three20库开发iPhone相册的文章,因为我也使用过此库,感觉很强大,转载过来给需要的童鞋参考。先来张效果图:Photo applications are very popular with iPhone users. One of the core features of popular photo applications is the Photo Galler 阅读全文
posted @ 2011-12-22 10:44 印错版的RMB 阅读(593) 评论(0) 推荐(0) 编辑
摘要: iphone中如何进行多线程编程转至:http://www.voland.com.cn/iphone-in-the-multi-threaded-programming 多线程在各种编程语言中都是难点,很多语言中实现起来很麻烦,objective-c虽然源于c,但其多线程编程却相当简单,可以与java相媲美。这篇 文章主要从线程创建与启动、线程的同步与锁、线程的交互、线程池等等四个方面简单的讲解一下iphone中的多线程编程。一、线程创建与启动 线程创建主要有二种方式:- (id)init; // designated initializer- (id)initWithTarget:(id)t 阅读全文
posted @ 2011-12-22 09:46 印错版的RMB 阅读(720) 评论(0) 推荐(0) 编辑
摘要: 本文转至:http://285746555.blog.51cto.com/2966432/600962three 20 是什么three20 是从第三方facebook 剥离出的一个框架, 主要涉及三大模块,网络 ,stysle 和ui突破了原有的模式,可以方便的定制出适合的界面风格,实现很多神奇的效果 如果想模仿iPhone邮件应用中的邮件编辑器,可以使用TTMessageController组件;如果想采用像Facebook那样的消息发送窗口,可以使用TTPostController组件。 还有支持Safari和YouTube的视图控制器。 Three20有一个功能强大的... 阅读全文
posted @ 2011-12-22 09:42 印错版的RMB 阅读(406) 评论(0) 推荐(0) 编辑
摘要: 数组a,count为维数。冒泡排序:每次交换相邻2个数,使最大的数放到a[j+1] for(int i = 0; i < count; i++) for(int j = 0;j < count - i - 1;j++) //每次交换只到倒数第二个,最后一次为倒数第二个和倒数第一个交换 if(a[j] < a[j+1]){ //交换a[j]和a[j+1] }选择排序:每次选择最小的数,使最小的放到a[i]。外层只循环count-1次,剩下一个自然是最大的,不用选择。 for(int i = 0;i < count - 1; i++) int... 阅读全文
posted @ 2011-12-07 09:37 印错版的RMB 阅读(185) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2011-12-06 11:24 印错版的RMB 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 前人总结的:http://www.poorren.com/css-ie-ff-margin-padding/自己开发中遇到的1、img图片下方会多出5px的空白,IE中。火狐不会。解决办法:定义css img{display:block;}2、少用padding和margin,最好用table。JS 阅读全文
posted @ 2011-11-24 15:37 印错版的RMB 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 右键菜单,采用JQuery,导入以下文件。jquery-1.6.4.min.jsjquery.contextMenu.css jquery.contextMenu.js绑定右键菜单$(document).ready(function () { //绑定右键菜单 $("#areaTree a").contextMenu( { menu: "menuAll" }, RightMenuClick ); });//areaTree 为Asp:TreeView控件的ID,menuAll为右键菜单ul的id。RightMenuClick为点击菜单后的回调函数。< 阅读全文
posted @ 2011-11-22 09:45 印错版的RMB 阅读(301) 评论(0) 推荐(0) 编辑