Search code examples
uitableviewtvos

Turn off UITableView bottom/top gradient mask on tvOS?


On tvOS, UITableView applies a nice looking gradient mask to the top and bottom of the view. In most instances this is the desired appearance, but in some cases it is not. Is there a way to conditionally turn that off? If there isn't an official way of doing this, has anyone found an indirect way of removing that effect?


Solution

  • You can disable it with the following:

    ObjC:

    self.tableView.maskView = nil;  
    

    Swift 4:

    self.tableView.mask = nil
    

    Source: How to remove UISplitViewController Master Navigation Blur Tint