No '|' candidates produce the expected contextual result type 'NSTextStorageEditActions'

前端 未结 2 777
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-03 20:07

I went through the Text Kit Tutorial on raywenderlich.com and the line

edited(.EditedCharacters | .EditedAttributes, range: range, changeInLength: (str as NS         


        
2条回答
  •  抹茶落季
    2021-01-03 20:23

    @dfri is correct. To illustrate another example of using the pipe, "|", is when doing the autoResizingMask for UIImageView as follows:

    imageView.autoresizingMask = [.FlexibleWidth, .FlexibleHeight, ...]

    Of course you'd replace the ... with other UIViewAutoresizing options.

    Good luck!

提交回复
热议问题