Skip to content

No access to tableView in Swift #96

@frios

Description

@frios

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions