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

No access to tableView in Swift #96

Open
frios opened this issue Feb 2, 2017 · 0 comments
Open

No access to tableView in Swift #96

frios opened this issue Feb 2, 2017 · 0 comments

Comments

@frios
Copy link

frios commented Feb 2, 2017

I was looking through your sample application and when translating the following code to Swift 3:

- (void)scroll;
{
    static BOOL atTop = YES;
    TSQCalendarView *calendarView = (TSQCalendarView *)self.view;
    UITableView *tableView = calendarView.tableView;
    
    [tableView setContentOffset:CGPointMake(0.f, atTop ? 10000.f : 0.f) animated:YES];
    atTop = !atTop;
}

I get an error:

Value of type TSQCalendarView has no member tableView

In order to give access to the tableView in Swift, I have moved the declaration of the tableView property from TSQCalendarView.m to TSQCalendarView.h

Is this a reasonable option?

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

1 participant