Skip to content

Commit

Permalink
fix delete Value for rating bar
Browse files Browse the repository at this point in the history
  • Loading branch information
ragaie committed Sep 9, 2019
1 parent 7f49047 commit b2fd4d3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
6 changes: 0 additions & 6 deletions RatingBar-Chtar/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="rateingValue">
<real key="value" value="0.0"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="image" keyPath="unrateImage" value="star"/>
<userDefinedRuntimeAttribute type="number" keyPath="ratingValue">
<real key="value" value="0.0"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Copy rights (c) 2017. Ragie alfy" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="92W-3R-MPM">
Expand Down
2 changes: 1 addition & 1 deletion RatingBar-Chtar/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ViewController: UIViewController,RatingBarDelegate {
override func viewDidLoad() {
super.viewDidLoad()

ratingbar.setRatingValue(rateValue: 1.5)
// ratingbar.setRatingValue(rateValue: 1.5)
ratingbar.delegate = self
}

Expand Down
4 changes: 2 additions & 2 deletions RatingBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ import UIKit
allRatingButton[i].setBackgroundImage(unrateImage, for: .normal)
allRatingButton[i].tag = 0
}
callDelegate(value: 2)
callDelegate(value: 3)

}
else{
Expand All @@ -258,7 +258,7 @@ import UIKit
allRatingButton[4].setBackgroundImage(unrateImage, for: .normal)
allRatingButton[4].tag = 0

callDelegate(value: 5)
callDelegate(value: 4)
}
break
default:
Expand Down

0 comments on commit b2fd4d3

Please sign in to comment.