***
#import "HMViewController.h"
#import <pthread.h> @interface HMViewController () @end @implementation HMViewController void *run(void *data)
{
for (int i = ; i<; i++) {
NSLog(@"touchesBegan----%d-----%@", i, [NSThread currentThread]);
}
return NULL;
} - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
// 创建线程
pthread_t myRestrict;
pthread_create(&myRestrict, NULL, run, NULL);
} @end