• Raed Alahmari

    Great tutorial. But I have problem second and third segment doesn’t load the arrays WHY?!!!!

    • Do you get any error messages?

      • Raed Alahmari

        No nothing!

        • Do you know if segmentedControlActionChanged function gets triggered? If you print(“function called”) into segmentedControlActionChanged function will it print something when you switch between segments?

          • Raed Alahmari

            Yup it dose.
            This is my code for “cellForRowAtIndexPath”
            http://i.imgur.com/KJI2pGo.png?1

          • Good. This tells me that segment control is working well… I would still check to make sure switch is working well by adding print statement inside of each switch case…. If it prints a value when you switch between segments then your table is also working… I think the issue is with business logic you have. I do not think it is correct to reload data inside of case:0 and case: 1. Looks like it might even cause an infinite loop. When table is being reloaded as soon as each cell is loaded again and again and again… Can you remove those reloadData()?

          • Raed Alahmari

            from the ActionChanged?!

          • Raed Alahmari

            I removed it from the ActionChanged but it load the same what ever on case 0 for all the cases?!

          • Raed Alahmari

            Yup it dose.
            This is my code for “cellForRowAtIndexPath”
            http://i.imgur.com/KJI2pGo.png?1