摘要: 1.在子线程中通过NSNotificationCenter,调用其他方法时,如果方法逻辑太复杂,创建太多对象时,处理结果往往不理想。例如,UILable不显示了等解决方案: 在调用的方法中使用下面的方法,注意BOOL是YES。把复杂逻辑和内存处理放在其他方法里。显示正常。 [self performSelectorOnMainThread:@selector() withObject:nil waitUntilDone:YES]; 阅读全文
posted @ 2013-07-31 17:47 李伯波 阅读(203) 评论(0) 推荐(0) 编辑
摘要: UDP---------------#include /* These are the usual header files */#include #include /* for close() */#include #include #include #include #include #define PORT 1234 /* Port that will be opened */#define MAXDATASIZE 100 /* Max number of bytes of data */main(){int sockfd; /* socke... 阅读全文
posted @ 2013-07-31 14:49 李伯波 阅读(179) 评论(0) 推荐(0) 编辑