I want to get text of UITextField
in a thread.
IBOutlet UITextField *textSearchBar;
{
NSThread* thread ......init:@selector(test)....
[thread start]
}
-(void)test
{
NSString* str = textSearchBar.text;//here to show '_WebThreadLockFromAnyThread'
}
i know i can use the code like this to fix it, but i do not want to use this way
{
NSThread* thread ......init:@selector(test)..withObject:textSearchBar.text];....
[thread start]
}
-(void)test:(NSString*)textStr
{
NSString* str = textStr;
}
so anyone knows any other way to get text from UITextField
without '_WebThreadLockFromAnyThread'