View properties do not appear in Storyboard support

0

Hi, I've been struggling since I started programming on iOS with the use of Pods in projects, an example is when I install Floaty Pod without problems and when I use it I do not see the properties of the view and so on I can design my button.

I have pointed to the class that belongs as follows, but I can not make the properties appear.

This is how it should appear but I can not find out why it does not appear in this way how it is displayed in the Github repository link :

This not only happens with this library, but also with all the ones I have installed, such as those of MaterialComponents, someone can help me please if something similar has happened to me since I have been struggling with it for some time and I can not find a root solution.

  • The Xcode version is: Version 10.1 (10B61)
  • The version of cocoapods is: cocoapods-1.5.3
  • The ruby version is: ruby 2.3.7p456
asked by Carlos Hernández 04.11.2018 в 22:44
source

1 answer

1

Reviewing the library that you comment Floaty to edit the attributes in the storyboard, you must declare the section "User Defined Runtime Attributes" as an attachment in the image1.The changes may not be reflected immediately for this there are two options; one having the "Automatically Refresh Views" option selected or clicking on "Refresh All Views"

As for not being visible in the "Attributes inspector" window, it is due to the declaration made by the library in its class Floaty.swift since it is declared as:

@IBInspectable
@objc open var plusColor: UIColor = UIColor(white: 0.2, alpha: 1)

If we modify deleting the compatibility "@objc" these statements are as follows:

@IBInspectable
open var plusColor: UIColor = UIColor(white: 0.2, alpha: 1)

You can view the properties in the "Attributes inspector" window as it is displayed in the image3

    
answered by 07.11.2018 / 23:18
source