Skip to content

Commit

Permalink
added country flag for reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
RishabhTayal committed Dec 29, 2017
1 parent 483b40b commit 9c8b55b
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 15 deletions.
1 change: 1 addition & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ target 'ReviewMonitor' do
pod 'TTRangeSlider' # Two thumb slider
pod 'Fabric'
pod 'Crashlytics'
pod 'FlagKit' # Show flags for the country locale
end
5 changes: 4 additions & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ PODS:
- Fabric (~> 1.6.3)
- DZNEmptyDataSet (1.8.1)
- Fabric (1.6.13)
- FlagKit (2.0.1)
- HCSStarRatingView (1.5)
- MBProgressHUD (1.0.0)
- Presentr (1.2.3)
Expand All @@ -16,6 +17,7 @@ DEPENDENCIES:
- Crashlytics
- DZNEmptyDataSet
- Fabric
- FlagKit
- HCSStarRatingView
- MBProgressHUD
- Presentr (from `https://github.com/fpg1503/Presentr.git`, branch `swift4`)
Expand All @@ -37,13 +39,14 @@ SPEC CHECKSUMS:
Crashlytics: 95d05f4e4c19a771250c4bd9ce344d996de32bbf
DZNEmptyDataSet: 9525833b9e68ac21c30253e1d3d7076cc828eaa7
Fabric: 2fb5676bc811af011a04513451f463dac6803206
FlagKit: 75c64346179f254d1753bebdc5b1f9cbe7890748
HCSStarRatingView: 1d18f79654735514cd6f00e6d90e38cb6320dc31
MBProgressHUD: 4890f671c94e8a0f3cf959aa731e9de2f036d71a
Presentr: e8ebcc64a85b9ab7b939825e7a8456fa395f680a
SDWebImage: 0e435c14e402a6730315a0fb79f95e68654d55a4
SwiftFormat: 9aadf994b01d08400d3d1b0112116d50e468ebd7
TTRangeSlider: 2f2ce4a33b32bb323c6575b9f5161c4664459c58

PODFILE CHECKSUM: 8090046f341b182785b6166f4b0a68d4078b32ad
PODFILE CHECKSUM: f890e4ed5d9efe99f97e83b28aede2a24efceb05

COCOAPODS: 1.3.1
2 changes: 2 additions & 0 deletions ReviewMonitor.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-ReviewMonitor/Pods-ReviewMonitor-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/DZNEmptyDataSet/DZNEmptyDataSet.framework",
"${BUILT_PRODUCTS_DIR}/FlagKit/FlagKit.framework",
"${BUILT_PRODUCTS_DIR}/HCSStarRatingView/HCSStarRatingView.framework",
"${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework",
"${BUILT_PRODUCTS_DIR}/Presentr/Presentr.framework",
Expand All @@ -416,6 +417,7 @@
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DZNEmptyDataSet.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FlagKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HCSStarRatingView.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Presentr.framework",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@

import UIKit
import HCSStarRatingView
import FlagKit

class ReviewsListTableViewCell: UITableViewCell {

@IBOutlet weak var containerView: UIView!
@IBOutlet weak var titleLabel: UILabel!
@IBOutlet weak var timeStampLabel: UILabel!
@IBOutlet weak var authorLabel: UILabel!
@IBOutlet weak var countryImageView: UIImageView!
@IBOutlet weak var ratingView: HCSStarRatingView!
@IBOutlet weak var reviewLabel: UILabel!
@IBOutlet weak var territoryImageView: UIImageView!
Expand All @@ -39,6 +41,7 @@ class ReviewsListTableViewCell: UITableViewCell {
formatter.dateFormat = "MMM dd, yyyy"
timeStampLabel.text = formatter.string(from: date)
authorLabel.text = review.storeFront
countryImageView.image = Flag(countryCode: review.storeFront!)?.originalImage
reviewLabel.text = review.review
ratingView.value = review.rating as! CGFloat
if let response = review.developerResponse, response.response != nil {
Expand Down
38 changes: 25 additions & 13 deletions ReviewMonitor/Supporting Files/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
<rect key="frame" x="15" y="15" width="345" height="139.5"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="FbT-ZY-XoN">
<rect key="frame" x="20" y="13" width="305" height="106"/>
<rect key="frame" x="20" y="13" width="305" height="102.5"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6ZN-ab-irV">
<rect key="frame" x="0.0" y="0.0" width="305" height="18"/>
Expand All @@ -136,15 +136,14 @@
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" spacing="13" translatesAutoresizingMaskIntoConstraints="NO" id="FzV-vL-T3y">
<rect key="frame" x="0.0" y="23" width="168.5" height="20"/>
<rect key="frame" x="0.0" y="23" width="195.5" height="16.5"/>
<subviews>
<view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6Ld-ZZ-ZP8" customClass="HCSStarRatingView">
<rect key="frame" x="0.0" y="0.0" width="120" height="20"/>
<rect key="frame" x="0.0" y="0.0" width="120" height="16.5"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<color key="tintColor" red="0.9279449582" green="0.72265732289999995" blue="0.21573978660000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" constant="120" id="Hbi-YK-x3S"/>
<constraint firstAttribute="height" constant="20" id="OOb-QP-Nqe"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="emptyStarColor">
Expand All @@ -155,28 +154,40 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gl1-6j-kNo">
<rect key="frame" x="133" y="0.0" width="35.5" height="20"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="w2c-jK-kip">
<rect key="frame" x="133" y="0.0" width="62.5" height="16.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gl1-6j-kNo">
<rect key="frame" x="0.0" y="0.0" width="35.5" height="16.5"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="kr5-SH-Zf4">
<rect key="frame" x="37.5" y="0.0" width="25" height="16.5"/>
<constraints>
<constraint firstAttribute="width" secondItem="kr5-SH-Zf4" secondAttribute="height" multiplier="3:2" id="3aI-Ng-XfV"/>
<constraint firstAttribute="width" constant="25" id="CYj-S9-b8H"/>
</constraints>
</imageView>
</subviews>
</stackView>
</subviews>
</stackView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CW4-GV-jKZ">
<rect key="frame" x="0.0" y="48" width="0.0" height="16"/>
<rect key="frame" x="0.0" y="44.5" width="0.0" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ohq-35-HOS">
<rect key="frame" x="0.0" y="69" width="35.5" height="16"/>
<rect key="frame" x="0.0" y="65.5" width="35.5" height="16"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UsJ-4N-cQK">
<rect key="frame" x="0.0" y="90" width="0.0" height="16"/>
<rect key="frame" x="0.0" y="86.5" width="0.0" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
Expand Down Expand Up @@ -205,6 +216,7 @@
<connections>
<outlet property="authorLabel" destination="gl1-6j-kNo" id="etm-qB-gXt"/>
<outlet property="containerView" destination="Au3-JM-Grn" id="4zA-An-Ai8"/>
<outlet property="countryImageView" destination="kr5-SH-Zf4" id="kXq-pq-uWb"/>
<outlet property="devResponseFlagLabel" destination="ohq-35-HOS" id="33Q-rp-dz6"/>
<outlet property="developerResponseLabel" destination="UsJ-4N-cQK" id="QLY-se-AmM"/>
<outlet property="ratingView" destination="6Ld-ZZ-ZP8" id="Ern-QY-doH"/>
Expand Down
2 changes: 1 addition & 1 deletion ReviewMonitor/Supporting Files/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundleShortVersionString</key>
<string>1.2</string>
<key>CFBundleVersion</key>
<string>328</string>
<string>337</string>
<key>Fabric</key>
<dict>
<key>APIKey</key>
Expand Down
5 changes: 5 additions & 0 deletions fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ xcode-select --install
fastlane ios test
```
Runs all the tests
### ios profiles
```
fastlane ios profiles
```

### ios beta
```
fastlane ios beta
Expand Down

0 comments on commit 9c8b55b

Please sign in to comment.