A simple drag-and-drop score view.
- Add
UIView
where you want to use it. - Click
UIView
and changeCustom Class
toRatingView
in the Attributes Inspector. - Specify the
User defined runtime attributes
of the Attributes Inspector as required.
// User defined runtime attributes 지정가능 옵션
// imageView
imageName
highlightColor
count // image의 전체 개수
//StackView
spacing
index // 초기 시작 인덱스
// RatingView Delegate Method
protocol RatingViewDelegate: AnyObject {
func didChangeIndex(_ index: Int)
}
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift
compiler.
Once you have your Swift package set up, adding Alamofire as a dependency is as easy as adding it to the dependencies
value of your Package.swift
.
dependencies: [
.package(url: "https://github.com/ebPark9511/RatingView.git", .upToNextMajor(from: "1.0.0"))
]
constraint
is calculated ascontent size
whenwidth
ofRatingView
andpriority
ofheight
is set tolow (250)
.