使用Mysql的Swift 2搜索栏
问题描述:
I'm sending to PHP using $_POST['find']
inside PHP
I generate echo json_encode($records);
table
My question is how I can show the result : "records" in my tableview cells
我使用 我的问题是如何显示结果:我的tableview中的“records” 单元格 p>
div> $ _ POST ['find'] code>在
中发送给PHP > PHP code>我生成
echo json_encode($ records); code> table p>
答
You'll need to parse the JSON response and store it in an array.
For example, using AlamoFire, you can parse the response with SwiftyJSON. Create an array of your records, and use that when getting data for a tableview cell.