2

I am quite new in iOS. I have a problem and not able to get the exact idea for implementation. I am uploading two images here, so please suggest me how can I implement it using Swift.

Here is my images:

enter image description here

enter image description here

In Images you can see that for a single viewController there is two tabs one is "YOUR GROUP" and another one is "SHARED BY". In that I have a tableView also. I have created two custom UITableViewCells one for "YOUR GROUP" and another one for "SHARED BY".

Actually basic idea I know that using UIPageViewController I can implement but for tab bar what I have to do.

Here below is the code for my custom cells:

 func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {

    if(1 == tagTableView)
    {
        var groupSharedByCell = tableView.dequeueReusableCell(withIdentifier: "GroupSharedByCell") as? GroupSharedByCell

        if (nil == groupSharedByCell) {

            var nib:Array = Bundle.main.loadNibNamed("GroupSharedByCell", owner: self, options: nil)!
            groupSharedByCell = nib[0] as? GroupSharedByCell
        }

        groupSharedByCell?.selectionStyle = UITableViewCellSelectionStyle.none

        //cell.
        return groupSharedByCell!
    }

    else
    {
        var yourGroupCell = tableView.dequeueReusableCell(withIdentifier: "YourGroupCell") as? YourGroupCell

        if (nil == yourGroupCell) {

            var nib:Array = Bundle.main.loadNibNamed("YourGroupCell", owner: self, options: nil)!
            yourGroupCell = nib[0] as? YourGroupCell
        }

        yourGroupCell?.selectionStyle = UITableViewCellSelectionStyle.none

        //cell.
        return yourGroupCell!
    }
}  

These cells are perfect, but using UITabBar and UIPageViewController how can I get the exact requirement? Or is there any alternative?

halfer
  • 19,824
  • 17
  • 99
  • 186
Kishor Pahalwani
  • 1,010
  • 1
  • 23
  • 53

0 Answers0