1

I am using swift and the couple of accessor functions as fallows:

let inset: UIEdgeInsets = UIEdgeInsetsMake(0,64,0,0)

collection.scrollIndicatorInsets(inset)
collection.contentInset(inset)

however I am getting an odd error:

'(UIEdgeInsets) -> $T4' is not identical to 'UIEdgeInsets'

Do I need to dereferance a the class or something? I have just never seen this error before and could not find anything like it. Thank you for your time and help!

CWineland
  • 615
  • 7
  • 18

1 Answers1

1

If you're trying to set scrollIndicatorInsets, try collection.scrollIndicatorInsets = inset instead

You can also invoke the default setter: setScrollIndicatorInsets() (Setters start with set by convention, borrowed from Obj-C.)

nielsbot
  • 15,922
  • 4
  • 48
  • 73