You didn't set yourself up as the delegate of the dataTableView
.
dataTableView.delegate = self;
The reason that cellForRowAtIndexPath
works is because that's part of the dataSource
whereas didSelectRowAtIndexPath
is part of the delegate
.