Closed Sweeper777 closed 7 years ago
Hi @Sweeper777,
The dataSource
and delegate
properties are set to AnyObject?
type because they are exposed to interface builder as @IBOutlet
properties, therefore they cannot have a non-'@objc'
protocol type, such as SJFluidSegmentedControlDataSource
or SJFluidSegmentedControlDelegate
.
Currently, both the
datasource
property and thedelegate
property are of typeAnyObject?
. Why not change them to be of typeSJFluidSegmentedControlDatasource?
andSJFluidSegmentedControlDelegate?
respectively? This way errors can be detected at compile time.