IOS-bridge-橋接

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    
    pthread_t pthread;
    NSString *name = @"ls";
    int result = pthread_create(&pthread, NULL, demo, (__bridge void *)(name));
    
}

void *demo(void *param) {
    
    NSString *name = (__bridge NSString *)(param);
    NSLog(@"hello %@ %@", name, [NSThread currentThread]);
    return NULL;
}


複製代碼
相關文章
相關標籤/搜索
本站公眾號
   歡迎關注本站公眾號,獲取更多信息