我正在尝试拨打服务器.GET调用工作正常并返回正确的json,但是当我尝试执行PUT或POST时,服务器返回错误.
我将服务器设置为接收下一条消息:
method POST
curl -X POST -d "number=NUMBER&name=NAME&lat=32.5713&lon=60.3926" http://server.com/users/
method PUT
curl -X PUT -d "number=USER&name=NAME6&lat=-34.5552&lon=32.3333" http://server.com/users/
Run Code Online (Sandbox Code Playgroud)
如何使用这两种方法调用服务器?
我正在尝试为我的iOS 7应用程序实现搜索栏.
表格视图不显示过滤器处于活动状态时的值,但过滤器是正确的.
所以,我得到了所有结果:

然后,我开始过滤数据没有有效的结果:

最后,我使用了一个有效的过滤器,并且日志结果是正确的,但表中没有显示:

我不知道如何找到问题.我的代码:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
// Return the number of rows in the section.
if (tableView == self.searchDisplayController.searchResultsTableView) {
return [self.searchResults count];
} else {
return [self.balancesData count];
}
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"balancesCell";
BalancesTableViewCell *cell = (BalancesTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
// Configure the cell...
if (cell == nil) {
cell = [[BalancesTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
Balances *balance = nil;
if (tableView == self.searchDisplayController.searchResultsTableView) { …Run Code Online (Sandbox Code Playgroud)