美文网首页
iOS url参数获取

iOS url参数获取

作者: 键盘仔 | 来源:发表于2018-09-05 17:33 被阅读33次
    NSArray *keyValues = [self.urlString componentsSeparatedByString:@"&"];
        NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
        
        for (NSString *keyValue in keyValues) {
            NSArray *arr = [keyValue componentsSeparatedByString:@"="];
            [dic setValue:arr[1] forKey:arr[0]];
        }
    

    相关文章

      网友评论

          本文标题:iOS url参数获取

          本文链接:https://www.haomeiwen.com/subject/eyfzwftx.html