When I'm creating an extension in Xcode and need to call:
segmentedControl.removeBorders()
Where should I call that from?. In viewDidLoad
for the view controller's Swift file? as an override func in the view controller's Swift file?. Inserting that after viewDidLoad is giving me a "Method 'segmentedControl' was used as a property; add () to call it" error and when I add the parentheses it gives me a
"Value of tuple type '()' has no member 'removeBorders'" error.
Is it an issue with naming? I named the .swift for deleting the borders/dividers "UISegmentedControl+removeborders.swift". I'm a complete n00b, if that helps to explain why I'm stuck on this. Any help would be greatly appreciated! Thanks!
Reference: The 3rd answer listed for this question regarding removing the border/dividers from UISegmentedControl: Remove UISegmentedControl separators completely. (iphone)