Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于搜索栏奔溃的问题 #12

Open
cattlelovegrass opened this issue May 25, 2016 · 1 comment
Open

关于搜索栏奔溃的问题 #12

cattlelovegrass opened this issue May 25, 2016 · 1 comment

Comments

@cattlelovegrass
Copy link

当没有字符串 ( 或者 )出现的时候,你用NSarray [1]是崩溃的
NSString *searchString = searchBar.text;

    if([searchString containsString:@"("]) {
        NSArray *array  = [[searchBar text]componentsSeparatedByString:@"("];
        NSString *second = array[1];
        if([second containsString:@")"]) {
            self.req_security_id = [second componentsSeparatedByString:@")"][0];
            NSLog(@"array:%@",self.req_security_id );
            [self getData];

        }
    }
@zhiyu
Copy link
Owner

zhiyu commented May 25, 2016

好的,谢谢!可以修改后提交上来,我merge一下。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants