Permalink
Browse files

added one review

  • Loading branch information...
1 parent 4f1ba53 commit d38afd1ada1ee1b7d9ac226b2392344b1fedea75 @tvillia committed Apr 3, 2012
Showing with 24 additions and 11 deletions.
  1. +4 −1 Restaurants/DetailViewController.m
  2. +2 −2 Restaurants/Review.h
  3. +18 −8 Restaurants/en.lproj/MainStoryboard.storyboard
@@ -55,7 +55,7 @@ - (void)viewDidLoad
Review* review4 = [[Review alloc] init];
review4.text = @"While the food is amazing, they often simply don't pick up the phone when ordering out!";
-// review4.reviewer = @"Paul";
+// review4.reviewer = @"Paul";
review4.score = 4;
review4.numberOfHelpfulRatings = 14;
review4.numberOfUnhelpfulRatings = 5;
@@ -68,6 +68,9 @@ - (void)viewDidLoad
navigationHeader.title = [restaurant name];
cuisineLabel.text = [restaurant cuisineType];
ageLabel.text = [NSString stringWithFormat:@"Est. %i (%i years ago)", restaurant.yearOpened, [restaurant age]];
+ helpfulReviewLabel.text = [review3 text];
+ helpfulReviewPercentageLabel.text = [NSString stringWithFormat:@"%i help %i unhelp", review3.numberOfHelpfulRatings, review3.numberOfUnhelpfulRatings];
+
}
View
@@ -11,15 +11,15 @@
@interface Review : NSObject
{
- NSString* reviewerName;
+ NSString* ReviewerName;
NSString* text;
int score; //(1 to 5, how good the reviewer thought the restaurant was)
int numberOfHelpfulRatings;
int numberOfUnhelpfulRatings;
}
-@property(readwrite, strong) NSString* reviewerName;
+@property(readwrite, strong) NSString* ReviewerName;
@property(readwrite, strong) NSString* text;
@property(readwrite) int score;
@property(readwrite) int numberOfHelpfulRatings;
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.1" toolsVersion="2177" systemVersion="11D50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="3">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.0" toolsVersion="1938" systemVersion="11D50b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="3">
<dependencies>
<development defaultVersion="4200" identifier="xcode"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1173"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="933"/>
</dependencies>
<scenes>
- <!--Navigation Controller-->
<scene sceneID="11">
<objects>
<placeholder placeholderIdentifier="IBFirstResponder" id="10" sceneMemberID="firstResponder"/>
@@ -20,7 +19,6 @@
</objects>
<point key="canvasLocation" x="-1" y="64"/>
</scene>
- <!--Master View Controller - Master-->
<scene sceneID="18">
<objects>
<placeholder placeholderIdentifier="IBFirstResponder" id="17" sceneMemberID="firstResponder"/>
@@ -65,9 +63,8 @@
<navigationItem key="navigationItem" title="Master" id="35"/>
</tableViewController>
</objects>
- <point key="canvasLocation" x="455" y="64"/>
+ <point key="canvasLocation" x="463" y="64"/>
</scene>
- <!--Detail View Controller - Detail-->
<scene sceneID="24">
<objects>
<placeholder placeholderIdentifier="IBFirstResponder" id="23" sceneMemberID="firstResponder"/>
@@ -101,7 +98,7 @@
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" id="2Sh-xI-yiT" userLabel="Stars">
- <rect key="frame" x="32" y="223" width="257" height="77"/>
+ <rect key="frame" x="32" y="215" width="257" height="77"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Average Customer Review:" lineBreakMode="tailTruncation" numberOfLines="0" minimumFontSize="10" id="Ota-aV-c6Z">
@@ -168,7 +165,20 @@
</connections>
</viewController>
</objects>
- <point key="canvasLocation" x="924" y="64"/>
+ <point key="canvasLocation" x="911" y="64"/>
+ </scene>
+ <scene sceneID="rFP-Se-b2d">
+ <objects>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="FFz-9K-L6d" userLabel="First Responder" sceneMemberID="firstResponder"/>
+ <viewController id="iSv-ya-KZe" sceneMemberID="viewController">
+ <view key="view" contentMode="scaleToFill" id="Sa0-4P-d2i">
+ <rect key="frame" x="0.0" y="20" width="320" height="460"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ </view>
+ </viewController>
+ </objects>
+ <point key="canvasLocation" x="1323" y="64"/>
</scene>
</scenes>
<resources>

0 comments on commit d38afd1

Please sign in to comment.