#pragma mark -- 发表评论 - (IBAction)publishBtn:(id)sender { if ([self.commentType isEqualToString:@"reply"]) { // NSString *content = self.replyParams[@"content"]; if (content.length < 1) { [MBProgressHUD showOnlyMessage:@"请输入评论内容" toView:self]; return; } } self.publishBtn.enabled = NO; [self performSelector:@selector(changeBtnStatus) withObject:nil afterDelay:1.0f]; // 防止按钮重复点击 [self distribute]; } -(void)changeBtnStatus{ self.publishBtn.enabled = YES; }
[self.commenRequestModel mj_keyValues]; // 模型转字典
如果是用别的语言的话都有将该string转为url或者网络编码的方法如:urlencode.
问题是,iphone中该如何处理这个编码问题呢?
找了答案:
[aString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];