Click here to Skip to main content
15,885,435 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Am new to swift.I have UISegmentcontrol with 3 segments i.e. New,Accepted,Completed. I need to display orders separate as New ,Accepted and Completed.and am using one tableview with custom cell for displaying orders data. am getting data from JSON and i can display the data on tableview.Now i need to display the orders data separate in 3 segments like depends on the status of order is New, i need to display order data in new segment.

CSS
Here is the format of json,

   {
  FileID: 27
  Borrower: {
    PersonName: "jhjb"
    PersonAddress: {
      Address1: "j"
      Address2: "kb"
      }
   PrimaryEmail: ""
   SecondaryEmail: ""
   HomePhone: ""
  }
  FileStatus: "New"
  }
  {
  FileID: 28
  Borrower: {
    PersonName: "jhjb"
    PersonAddress: {
      Address1: "j"
      Address2: "kb"
      }
   PrimaryEmail: ""
   SecondaryEmail: ""
   HomePhone: ""
  }
  FileStatus: "Accepeted"
  }
Here i need to filter the json data depends on "FileStatus". Please let me know how to split data and dispaly in tableview using swift.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900