使用 swift 个文件时使用未声明的类型
Use of undeclared type when using swift files
我正在尝试在我的应用程序中使用星级评分系统,可以在此 link:https://github.com/exchangegroup/star-rating-view 找到。我将文件拖放到我的项目中,但出于某种原因,当我尝试为评级视图创建一个 IBOutlet 作为 "TagStarRatingView" 时,我总是收到一个错误,显示 "Use of undeclared type TegStarRating"。我对为什么会收到此错误感到困惑,因为文件 TegStarRating 文件是在 swift 中编码的,所以我不需要在桥接 header 中导入它们。知道如何解决这个问题吗?
您还必须将其拖放到正确的组中。按照 github 上的说明进行操作:
- Copy
.swift
files under start-rating-view
group into your project.
- Add View control into your storyboard. Set its class to
TegStarRatingView
.
- Add an outlet for this view in your view controller.
- Use
show
method to display rating:
我正在尝试在我的应用程序中使用星级评分系统,可以在此 link:https://github.com/exchangegroup/star-rating-view 找到。我将文件拖放到我的项目中,但出于某种原因,当我尝试为评级视图创建一个 IBOutlet 作为 "TagStarRatingView" 时,我总是收到一个错误,显示 "Use of undeclared type TegStarRating"。我对为什么会收到此错误感到困惑,因为文件 TegStarRating 文件是在 swift 中编码的,所以我不需要在桥接 header 中导入它们。知道如何解决这个问题吗?
您还必须将其拖放到正确的组中。按照 github 上的说明进行操作:
- Copy
.swift
files understart-rating-view
group into your project.- Add View control into your storyboard. Set its class to
TegStarRatingView
.- Add an outlet for this view in your view controller.
- Use
show
method to display rating: