摘要: 用过UIScrollView的都会发现UIScrollView不会响应touch事件,这样就无法在touches相关的方法中做一些事情了,比如收回键盘等等。其实写个categroy就可以解决这个问题了。具体实现如下:@implementation UIScrollView (UITouchEvent... 阅读全文
posted @ 2014-11-21 11:12 niehaili 阅读(245) 评论(0) 推荐(0) 编辑
摘要: //学生结构体typedef struct student{ char name[20]; //姓名 char sex; //性别 int age; //年龄}Student;int main(int argc, const char * argv[])... 阅读全文
posted @ 2014-09-11 17:49 niehaili 阅读(453) 评论(0) 推荐(0) 编辑
摘要: 找出一个二维数组中的“鞍点”,即该位置上的元素在该行中 最大,在该列中最小(也可能没有“鞍点”),打印有关信息。(提示:注意特 殊情况:没鞍点或多个鞍点)方法一:void test3_1(){ int testArray[3][4]={0}; for (int i=0; itestArr... 阅读全文
posted @ 2014-08-23 13:37 niehaili 阅读(991) 评论(0) 推荐(0) 编辑
摘要: void removeNumberFromString(char string[]){ int i=0,j=0; while (*(string+i)) { if (*(string+i)>'9' || *(string+i)<'0') { *(str... 阅读全文
posted @ 2014-08-23 10:47 niehaili 阅读(489) 评论(0) 推荐(0) 编辑