TextFieldEffects: IB Designables Error

I am using xCode 8 with Swift 2.3 so I install TextFieldEffects using Cocoapods pod 'TextFieldEffects', '~> 1.2.0'

The problem is that I get errors ever since I upgraded to xCode 8

screen shot 2016-09-26 at 3 23 40 pm

I believe it’s because of the @IBDesignable notation for the TextFieldEffects as it is only throwing errors on views with these custom TextFields.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 21 (4 by maintainers)

Most upvoted comments

I found out that it is a bug in Xcode 9, not in the code…

@alanshih I have no idea whether is a bug in Xcode or in the Pod management. However, you can stay updated by checking this repo updates.

Hope this helps.

@alanshih I removed from the source of the Pod the string @IBDesignable.

In my project I am using only HoshiTextField therefore, I looked for the HoshiTextField.swift file and I changed the first line of the class from @IBDesignable public class HoshiTextField: TextFieldEffects { to public class HoshiTextField: TextFieldEffects {. If you are using other custom textfields you should do the same procedure for each textfield class. After that, clean your project, restart Xcode and perform a full build. The errors should be gone but you won’t be able to see anymore the UI updates of the textfields in the Storyboard.

I also encountered this problem but it also occurred when I was using another library that use IBDesignable so I guess the problem is in the XCode itself. I suggest you use XCode 7.3 if you are still developing with Swift 2.3 like me.