2012年7月30日
摘要: (1)避免同时点击多个按钮; [myButtonsetExclusiveTouch:YES]; 设置确保当myButton点击时,其他按钮不响应;(2)避免同时点击UITableView中多个row-(NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath{ if ([tableView indexPathForSelectedRow] != nil) //如果已经选定某cell,则不允许同时选择另一Cell。 returnnil; else re... 阅读全文
posted @ 2012-07-30 14:29 wawacool 阅读(480) 评论(0) 推荐(0) 编辑
2012年3月27日
摘要: 1. 日志生成、分级;使用AnkyHe编写的SimpleLogger类(见http://ankyhe.iteye.com/blog/365628),完成日志的分级、格式化、输出等工作:关键代码为一系列日志格式宏,其中AnkyHe的代码中RETURN宏定义如下,在输出日志的同时,完成了函数返回。为了避免该宏的误用,提高易读性,特进行修改去掉return调用。#define RETURN(returnValue, format, ...) [[SimpleLogger getLogger] retrn:[NSString stringWithFormat:(format), ##__VA_ARGS 阅读全文
posted @ 2012-03-27 14:24 wawacool 阅读(815) 评论(0) 推荐(0) 编辑