摘要: 一、添加UITableViewCell为自己设计的风格- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{//两个section cell id要不同 if(indexPath.section == 0) { NSString *C... 阅读全文
posted @ 2011-03-08 17:13 AnMog 阅读(1509) 评论(0) 推荐(0) 编辑
摘要: NSString* url = [NSString stringWithFormat:@"%s?mt=1&qt=6045&mobilekey=%@", gURLHEADER.getData(), [[UIDevice currentDevice] uniqueIdentifier]]; NSURL *c_url = [NSURL... 阅读全文
posted @ 2011-03-08 17:13 AnMog 阅读(233) 评论(0) 推荐(0) 编辑
摘要: - (UIImage *)addTwoImageToOne:(UIImage *) oneImg twoImage:(UIImage *) twoImg{ UIGraphicsBeginImageContext(oneImg.size); [oneImg drawInRect:CGRectMake(0, 0, oneImg.size.width, oneImg.size.height)... 阅读全文
posted @ 2011-03-08 17:11 AnMog 阅读(663) 评论(0) 推荐(0) 编辑
摘要: 内部定义外部调用1.头文件定义#pragma mark TQDownViewCell@protocol TQDownViewCellDelegate- (void)reloadTableView;@end@interface TQDownViewCell : UITableViewCell{ id delegate;}@property (nonatomic, assign)id de... 阅读全文
posted @ 2011-03-08 17:10 AnMog 阅读(284) 评论(0) 推荐(0) 编辑
摘要: UIImage *img = imgView.image; int h = img.size.height;int w = img.size.width;if(h <= 320 && w<= 480){imgView.image = img;}else {float b = (float)320/w < (float)480/h ? (float)320/w: (float)480/h... 阅读全文
posted @ 2011-03-08 17:00 AnMog 阅读(487) 评论(0) 推荐(0) 编辑
摘要: 原文地址:ASIHTTPRequest使用介绍作者:林肯公园 ASIHTTPRequest,是一个直接在CFNetwork上做的开源项目,提供了一个比官方更方便更强大的HTTP网络传输的封装。ASIHTTPRequest 官方网站地址:http://allseeing-i.com/ 一、介绍特色功能如下:1.下载的数据直接保存到内存或文件系统里2.提供直接提交(HTTP POST)文... 阅读全文
posted @ 2011-03-08 16:56 AnMog 阅读(1795) 评论(0) 推荐(0) 编辑
摘要: 原文地址:iPhone程序中将内容分享到新浪微博作者:Harry因为要用到,所以找来,和大家分享:1. 首先在http://open.t.sina.com.cn/中申请成为开发者,再创建不同的应用,获得相应的App Key (在下面链接中的source即为app key) 2. 登录认证:NSString *authString = [NSString stringWithFormat... 阅读全文
posted @ 2011-03-08 16:55 AnMog 阅读(574) 评论(0) 推荐(0) 编辑
摘要: 获取图片中间的正方形+(UIImage*)smallImage:(UIImage*)bigImg{CGSize imgsize = bigImg.size; NSInteger w =imgsize.width>imgsize.height?imgsize.height:imgsize.width;CGRect rect;if(imgsize.width>imgsize.heig... 阅读全文
posted @ 2011-03-08 16:52 AnMog 阅读(446) 评论(0) 推荐(0) 编辑
摘要: - (void)viewDidLoad { [superviewDidLoad];CGRectframe=CGRectMake(520,280,320,480);CGImageRefsmall;small=CGImageCreateWithImageInRect([[UIImageimageNamed... 阅读全文
posted @ 2011-03-08 16:44 AnMog 阅读(1332) 评论(0) 推荐(0) 编辑