objc-TimesSquare
objc-TimesSquare copied to clipboard
No access to tableView in Swift
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?