Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can i use tableview controller and cell inside App ? #10

Closed
IOSDeveloperProgrammer opened this issue Sep 26, 2017 · 3 comments
Closed

Comments

@IOSDeveloperProgrammer
Copy link

IOSDeveloperProgrammer commented Sep 26, 2017

@EzimetYusup Thanks for giving library! i need to populating tableview data.
func WTSviewOfTab(index: Int) -> UIView { let view:LeaveTableVC = LeaveTableVC() if index == 0 { view.view.backgroundColor = UIColor.black }

self.tableview.delegate = self
    self.tableview.dataSource = self,  `

Error: fatal error: unexpectedly found nil while unwrapping an Optional value

I was getting tableview.delegate = self (in leavetableVC class)
Please help me out this issue

@EzimetYusup
Copy link
Owner

@IOSDeveloperProgrammer can u send me the project or your ViewController?

@IOSDeveloperProgrammer
Copy link
Author

@EzimetYusup sorry for late! I was busy with another project. #
screen shot 2017-09-28 at 11 39 47 am
screen shot 2017-09-28 at 11 40 17 am

When i was adding tableview on delegate method here
` func WTSviewOfTab(index: Int) -> UIView {

    let view:LeaveTableVC = LeaveTableVC()
    if index == 0 {
        view.view.backgroundColor = UIColor.black
    }
    else if index == 1 {
        view.view.backgroundColor = UIColor.gray
    }
    //        if index == 2 || index == 5{
    //            view.view.backgroundColor = UIColor.redColor()
    //
    //        }
    
    
    return view.view
}

`

leavetable.swift
super.viewDidLoad() self.tableview.delegate = self self.tableview.dataSource = self

@EzimetYusup
Copy link
Owner

@IOSDeveloperProgrammer please check new example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants