     
     func setupInfiniteLoadingView() {
         // Set up Infinite Scroll loading indicator
-        if(segmentViewType.selectedSegmentIndex==0) {
-            let frame = CGRect(x: 0, y: movieTable.contentSize.height, width: movieTable.bounds.size.width, height: InfiniteScrollActivityView.defaultHeight)
-            loadingMoreViewTable = InfiniteScrollActivityView(frame: frame)
-            loadingMoreViewTable!.isHidden = true
-            movieTable.addSubview(loadingMoreViewTable!)
-            
-            var insets = movieTable.contentInset
-            insets.bottom += InfiniteScrollActivityView.defaultHeight
-            movieTable.contentInset = insets
-        } else {
-            let frameCollection = CGRect(x: 0, y: movieCollection.contentSize.height, width: movieCollection.bounds.size.width, height: InfiniteScrollActivityView.defaultHeight)
-            loadingMoreViewCollection = InfiniteScrollActivityView(frame: frameCollection)
-            loadingMoreViewCollection!.isHidden = true
-            movieCollection.addSubview(loadingMoreViewCollection!)
-            
-            var insetsCollection = movieCollection.contentInset
-            insetsCollection.bottom += InfiniteScrollActivityView.defaultHeight
-            movieCollection.contentInset = insetsCollection
-        }
-
+        let frame = CGRect(x: 0, y: movieTable.contentSize.height, width: movieTable.bounds.size.width, height: InfiniteScrollActivityView.defaultHeight)
+        loadingMoreViewTable = InfiniteScrollActivityView(frame: frame)
+        loadingMoreViewTable!.isHidden = true
     }
 }
 

        
        if segmentViewType.selectedSegmentIndex == 0 {
            movieTable.insertSubview(refreshControl, at: 0)
        } else {
            movieCollection.insertSubview(refreshControl, at: 0)
        }
        
        setupInfiniteLoadingView()
    }
    
    // MARK: - Navigation

        movieCollection.dataSource = self
        searchBarCtrl.delegate = self
        
        setupInfiniteLoadingView()
        setupRefreshControl()
        setupSearchBar()
        configureCollectionView()
        
        loadSettings()
        
        loadJsonData()
        
        navigationController?.navigationBar.barTintColor = UIColor(red:0.98, green:0.86, blue:0.52, alpha:1.0)
        navigationController?.navigationBar.backgroundColor = UIColor(red:0.98, green:0.86, blue:0.52, alpha:1.0)
