forked from organicmaps/organicmaps
[ugc] [ios] Removed legacy UGC UI.
This commit is contained in:
parent
34b203c89e
commit
5c6bdc3841
14 changed files with 0 additions and 935 deletions
|
@ -1,12 +0,0 @@
|
|||
#import "MWMTableViewCell.h"
|
||||
|
||||
namespace ugc
|
||||
{
|
||||
struct Review;
|
||||
}
|
||||
|
||||
@interface MWMUGCCommentCell : MWMTableViewCell
|
||||
|
||||
- (void)configWithReview:(ugc::Review const &)review;
|
||||
|
||||
@end
|
|
@ -1,97 +0,0 @@
|
|||
#import "MWMUGCCommentCell.h"
|
||||
#import "UIImageView+Coloring.h"
|
||||
|
||||
#include "ugc/types.hpp"
|
||||
|
||||
namespace
|
||||
{
|
||||
NSString * formattedDateFrom(ugc::Time time)
|
||||
{
|
||||
NSDateComponentsFormatter * formatter = [[NSDateComponentsFormatter alloc] init];
|
||||
formatter.unitsStyle = NSDateComponentsFormatterUnitsStyleFull;
|
||||
|
||||
using namespace std::chrono;
|
||||
NSTimeInterval const t = duration_cast<seconds>(time.time_since_epoch()).count();
|
||||
|
||||
NSDate * date = [NSDate dateWithTimeIntervalSince1970:t];
|
||||
NSCalendar * calendar = NSCalendar.currentCalendar;
|
||||
auto const mask = (NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitWeekOfMonth |
|
||||
NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute);
|
||||
NSDateComponents * components = [calendar components:mask fromDate:date];
|
||||
|
||||
if (components.year > 0) {
|
||||
formatter.allowedUnits = NSCalendarUnitYear;
|
||||
} else if (components.month > 0) {
|
||||
formatter.allowedUnits = NSCalendarUnitMonth;
|
||||
} else if (components.weekOfMonth > 0) {
|
||||
formatter.allowedUnits = NSCalendarUnitWeekOfMonth;
|
||||
} else if (components.day > 0) {
|
||||
formatter.allowedUnits = NSCalendarUnitDay;
|
||||
} else if (components.hour > 0) {
|
||||
formatter.allowedUnits = NSCalendarUnitHour;
|
||||
} else if (components.minute > 0) {
|
||||
formatter.allowedUnits = NSCalendarUnitMinute;
|
||||
} else {
|
||||
formatter.allowedUnits = NSCalendarUnitSecond;
|
||||
}
|
||||
|
||||
return [formatter stringFromDateComponents:components];
|
||||
}
|
||||
}
|
||||
|
||||
@interface MWMUGCCommentCell ()
|
||||
|
||||
@property(weak, nonatomic) IBOutlet UILabel * author;
|
||||
@property(weak, nonatomic) IBOutlet UILabel * date;
|
||||
@property(weak, nonatomic) IBOutlet UILabel * comment;
|
||||
@property(weak, nonatomic) IBOutlet UILabel * positiveCount;
|
||||
@property(weak, nonatomic) IBOutlet UILabel * negativeCount;
|
||||
@property(weak, nonatomic) IBOutlet UIImageView * thumbUp;
|
||||
@property(weak, nonatomic) IBOutlet UIImageView * thumbDown;
|
||||
@property(weak, nonatomic) IBOutlet UIButton * thumbUpButton;
|
||||
@property(weak, nonatomic) IBOutlet UIButton * thumbDownButton;
|
||||
@property(weak, nonatomic) IBOutlet UIButton * showOriginal;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MWMUGCCommentCell
|
||||
|
||||
- (void)configWithReview:(ugc::Review const &)review
|
||||
{
|
||||
self.author.text = @(review.m_author.c_str());
|
||||
self.comment.text = @(review.m_text.m_text.c_str());
|
||||
self.date.text = formattedDateFrom(review.m_time);
|
||||
}
|
||||
|
||||
#pragma mark - Actions
|
||||
|
||||
- (IBAction)thumbUpTap
|
||||
{
|
||||
self.thumbUp.mwm_coloring = self.thumbUpButton.isSelected ? MWMImageColoringBlack : MWMImageColoringGray;
|
||||
// TODO: Increment positive count
|
||||
if (self.thumbDownButton.selected)
|
||||
{
|
||||
self.thumbDown.mwm_coloring = MWMImageColoringGray;
|
||||
self.thumbDownButton.selected = NO;
|
||||
// Decrement negative count
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)thumbDownTap
|
||||
{
|
||||
self.thumbDown.mwm_coloring = self.thumbDownButton.isSelected ? MWMImageColoringBlack : MWMImageColoringGray;
|
||||
// TODO: Increment negative count
|
||||
if (self.thumbUpButton.selected)
|
||||
{
|
||||
self.thumbUp.mwm_coloring = MWMImageColoringGray;
|
||||
self.thumbUpButton.selected = NO;
|
||||
// Decrement positive count
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)showOriginalTap
|
||||
{
|
||||
// TODO: Show original comment. Will be implemented soon.
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,74 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="MWMUGCCommentCell" rowHeight="85" id="7OT-yL-P9Y" customClass="MWMUGCCommentCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="85"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="7OT-yL-P9Y" id="deN-eU-5Jw">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="84"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Author" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="auV-Fe-jjv">
|
||||
<rect key="frame" x="16" y="16" width="291" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium14"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="501" verticalHuggingPriority="251" text="Date" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NXc-T4-2At">
|
||||
<rect key="frame" x="323" y="16" width="36" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular12"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackHintText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Comment" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kZb-7M-LpR" userLabel="Comment">
|
||||
<rect key="frame" x="16" y="49" width="343" height="20"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular14"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="NXc-T4-2At" secondAttribute="trailing" constant="16" id="1lS-HM-qlf"/>
|
||||
<constraint firstAttribute="trailing" secondItem="kZb-7M-LpR" secondAttribute="trailing" constant="16" id="6KU-n6-AGI"/>
|
||||
<constraint firstItem="kZb-7M-LpR" firstAttribute="top" secondItem="auV-Fe-jjv" secondAttribute="bottom" constant="12" id="Fuo-3p-DCz"/>
|
||||
<constraint firstAttribute="bottom" secondItem="kZb-7M-LpR" secondAttribute="bottom" constant="15.5" id="PIB-YP-jlS"/>
|
||||
<constraint firstItem="NXc-T4-2At" firstAttribute="leading" secondItem="auV-Fe-jjv" secondAttribute="trailing" constant="16" id="SKZ-ht-fsR"/>
|
||||
<constraint firstItem="kZb-7M-LpR" firstAttribute="leading" secondItem="deN-eU-5Jw" secondAttribute="leading" constant="16" id="Uy4-XY-EWE"/>
|
||||
<constraint firstItem="auV-Fe-jjv" firstAttribute="leading" secondItem="deN-eU-5Jw" secondAttribute="leading" constant="16" id="WfW-dk-9h5"/>
|
||||
<constraint firstItem="auV-Fe-jjv" firstAttribute="top" secondItem="deN-eU-5Jw" secondAttribute="top" constant="16" id="aSe-di-2Sq"/>
|
||||
<constraint firstItem="kZb-7M-LpR" firstAttribute="top" secondItem="NXc-T4-2At" secondAttribute="bottom" constant="12" id="eVA-B8-y5Z"/>
|
||||
<constraint firstItem="NXc-T4-2At" firstAttribute="top" secondItem="deN-eU-5Jw" secondAttribute="top" constant="16" id="pag-IB-oXr"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
<connections>
|
||||
<outlet property="author" destination="auV-Fe-jjv" id="a77-en-qWv"/>
|
||||
<outlet property="comment" destination="kZb-7M-LpR" id="fzO-Fd-L8v"/>
|
||||
<outlet property="date" destination="NXc-T4-2At" id="xgH-dJ-dxG"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-15" y="57"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
|
@ -1,9 +0,0 @@
|
|||
#import "MWMTableViewController.h"
|
||||
|
||||
@class MWMUGCReviewVM;
|
||||
|
||||
@interface MWMUGCReviewController : MWMTableViewController
|
||||
|
||||
+ (instancetype)instanceFromViewModel:(MWMUGCReviewVM *)viewModel;
|
||||
|
||||
@end
|
|
@ -1,78 +0,0 @@
|
|||
#import "MWMUGCReviewController.h"
|
||||
#import "MWMUGCReviewVM.h"
|
||||
#import "SwiftBridge.h"
|
||||
|
||||
#include "ugc/types.hpp"
|
||||
|
||||
@interface MWMUGCReviewController ()
|
||||
|
||||
@property(weak, nonatomic) MWMUGCReviewVM<MWMUGCSpecificReviewDelegate, MWMUGCTextReviewDelegate> * viewModel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MWMUGCReviewController
|
||||
|
||||
+ (instancetype)instanceFromViewModel:(MWMUGCReviewVM *)viewModel
|
||||
{
|
||||
auto inst = [[MWMUGCReviewController alloc] initWithNibName:self.className bundle:nil];
|
||||
inst.viewModel = static_cast<MWMUGCReviewVM<MWMUGCSpecificReviewDelegate, MWMUGCTextReviewDelegate> *>(viewModel);
|
||||
return inst;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
self.title = self.viewModel.name;
|
||||
auto tv = self.tableView;
|
||||
tv.estimatedRowHeight = 44;
|
||||
tv.rowHeight = UITableViewAutomaticDimension;
|
||||
[tv registerWithCellClass:[MWMUGCSpecificReviewCell class]];
|
||||
[tv registerWithCellClass:[MWMUGCTextReviewCell class]];
|
||||
self.navigationItem.rightBarButtonItem =
|
||||
[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
|
||||
target:self
|
||||
action:@selector(submitTap)];
|
||||
}
|
||||
|
||||
- (void)submitTap
|
||||
{
|
||||
[self.viewModel submit];
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
#pragma mark - UITableView's methods
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return self.viewModel.numberOfRows;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
using ugc_review::Row;
|
||||
auto vm = self.viewModel;
|
||||
switch ([vm rowForIndexPath:indexPath])
|
||||
{
|
||||
case Row::Detail:
|
||||
{
|
||||
auto const & record = [vm recordForIndexPath:indexPath];
|
||||
Class cls = [MWMUGCSpecificReviewCell class];
|
||||
auto c = static_cast<MWMUGCSpecificReviewCell *>([tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]);
|
||||
[c configWithSpecification:@(record.m_key.m_key.c_str())
|
||||
rate:static_cast<NSInteger>(record.m_value)
|
||||
atIndexPath:indexPath
|
||||
delegate:vm];
|
||||
return c;
|
||||
}
|
||||
case Row::SpecialQuestion:
|
||||
case Row::Message:
|
||||
{
|
||||
Class cls = [MWMUGCTextReviewCell class];
|
||||
auto c = static_cast<MWMUGCTextReviewCell *>([tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]);
|
||||
[c configWithDelegate:vm];
|
||||
return c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,30 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MWMUGCReviewController">
|
||||
<connections>
|
||||
<outlet property="view" destination="TRh-wl-yRo" id="ycQ-bX-uGi"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" allowsSelection="NO" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="TRh-wl-yRo">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
<inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="-1" id="QPn-i3-DtA"/>
|
||||
<outlet property="delegate" destination="-1" id="Gv3-xw-NFq"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="42" y="30"/>
|
||||
</tableView>
|
||||
</objects>
|
||||
</document>
|
|
@ -1,34 +0,0 @@
|
|||
namespace ugc
|
||||
{
|
||||
struct RatingRecord;
|
||||
struct UGCUpdate;
|
||||
}
|
||||
|
||||
struct FeatureID;
|
||||
|
||||
namespace ugc_review
|
||||
{
|
||||
enum class Row
|
||||
{
|
||||
Detail,
|
||||
SpecialQuestion,
|
||||
Message
|
||||
};
|
||||
} // namespace ugc
|
||||
|
||||
@interface MWMUGCReviewVM : NSObject
|
||||
|
||||
+ (instancetype)fromUGC:(ugc::UGCUpdate const &)ugc
|
||||
featureId:(FeatureID const &)fid
|
||||
name:(NSString *)name;
|
||||
|
||||
- (NSInteger)numberOfRows;
|
||||
- (ugc_review::Row)rowForIndexPath:(NSIndexPath *)indexPath;
|
||||
- (ugc::RatingRecord const &)recordForIndexPath:(NSIndexPath *)indexPath;
|
||||
- (NSString *)review;
|
||||
- (NSString *)name;
|
||||
|
||||
- (void)setDefaultStarCount:(NSInteger)starCount;
|
||||
- (void)submit;
|
||||
|
||||
@end
|
|
@ -1,75 +0,0 @@
|
|||
#import "MWMUGCReviewVM.h"
|
||||
#import "SwiftBridge.h"
|
||||
|
||||
#include "Framework.h"
|
||||
|
||||
#include "ugc/types.hpp"
|
||||
|
||||
@interface MWMUGCReviewVM () <MWMUGCSpecificReviewDelegate, MWMUGCTextReviewDelegate>
|
||||
{
|
||||
ugc::UGCUpdate m_ugc;
|
||||
FeatureID m_fid;
|
||||
std::vector<ugc_review::Row> m_rows;
|
||||
}
|
||||
|
||||
@property(copy, nonatomic) NSString * review;
|
||||
@property(copy, nonatomic) NSString * name;
|
||||
@property(nonatomic) NSInteger starCount;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MWMUGCReviewVM
|
||||
|
||||
+ (instancetype)fromUGC:(ugc::UGCUpdate const &)ugc
|
||||
featureId:(FeatureID const &)fid
|
||||
name:(NSString *)name
|
||||
{
|
||||
auto inst = [[MWMUGCReviewVM alloc] init];
|
||||
inst.name = name;
|
||||
inst->m_ugc = ugc;
|
||||
inst->m_fid = fid;
|
||||
[inst config];
|
||||
return inst;
|
||||
}
|
||||
|
||||
- (void)config
|
||||
{
|
||||
// TODO: Config controller with ugc.
|
||||
}
|
||||
|
||||
- (void)setDefaultStarCount:(NSInteger)starCount
|
||||
{
|
||||
// TODO: Set stars count.
|
||||
}
|
||||
|
||||
- (void)submit
|
||||
{
|
||||
GetFramework().GetUGCApi()->SetUGCUpdate(m_fid, m_ugc);
|
||||
}
|
||||
|
||||
- (NSInteger)numberOfRows { return m_rows.size(); }
|
||||
|
||||
- (ugc::RatingRecord const &)recordForIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
// TODO: Return rating record from ugc.
|
||||
return ugc::RatingRecord();
|
||||
}
|
||||
|
||||
- (ugc_review::Row)rowForIndexPath:(NSIndexPath *)indexPath { return m_rows[indexPath.row]; }
|
||||
|
||||
#pragma mark - MWMUGCSpecificReviewDelegate
|
||||
|
||||
- (void)changeReviewRate:(NSInteger)rate atIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
//TODO: Change review rate.
|
||||
}
|
||||
|
||||
#pragma mark - MWMUGCTextReviewDelegate
|
||||
|
||||
- (void)changeReviewText:(NSString *)text
|
||||
{
|
||||
self.review = text;
|
||||
// TODO: Write the review into ugc object.
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,14 +0,0 @@
|
|||
#import "MWMTableViewController.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace ugc
|
||||
{
|
||||
struct Review;
|
||||
}
|
||||
|
||||
@interface MWUGCCommentsController : MWMTableViewController
|
||||
|
||||
+ (instancetype)instanceWithTitle:(NSString *)title comments:(std::vector<ugc::Review> const &)comments;
|
||||
|
||||
@end
|
|
@ -1,48 +0,0 @@
|
|||
#import "MWUGCCommentsController.h"
|
||||
#import "MWMUGCCommentCell.h"
|
||||
#import "SwiftBridge.h"
|
||||
|
||||
#include "ugc/types.hpp"
|
||||
|
||||
@interface MWUGCCommentsController ()
|
||||
{
|
||||
std::vector<ugc::Review> m_dataSource;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation MWUGCCommentsController
|
||||
|
||||
+ (instancetype)instanceWithTitle:(NSString *)title comments:(std::vector<ugc::Review> const &)comments
|
||||
{
|
||||
auto inst = [[MWUGCCommentsController alloc] initWithNibName:self.className bundle:nil];
|
||||
inst.title = title;
|
||||
inst->m_dataSource = comments;
|
||||
return inst;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
auto tv = self.tableView;
|
||||
tv.estimatedRowHeight = 44;
|
||||
tv.rowHeight = UITableViewAutomaticDimension;
|
||||
[tv registerWithCellClass:[MWMUGCCommentCell class]];
|
||||
}
|
||||
|
||||
#pragma mark - UITableView's methods
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return m_dataSource.size();
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
Class cls = [MWMUGCCommentCell class];
|
||||
auto c = static_cast<MWMUGCCommentCell *>([tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]);
|
||||
[c configWithReview:m_dataSource[indexPath.row]];
|
||||
return c;
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,29 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MWUGCCommentsController">
|
||||
<connections>
|
||||
<outlet property="view" destination="Lve-vE-lQE" id="aUI-r7-4UT"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="Lve-vE-lQE">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="-1" id="gll-Ia-c1n"/>
|
||||
<outlet property="delegate" destination="-1" id="oGp-Gc-vbh"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="67" y="140"/>
|
||||
</tableView>
|
||||
</objects>
|
||||
</document>
|
|
@ -1,226 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="139" id="8mr-2l-jxR" customClass="MWMUGCSelectImpressionCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="139"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="8mr-2l-jxR" id="29u-J5-Cmg">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="138"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Impression" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fjZ-hn-8ng">
|
||||
<rect key="frame" x="16" y="14" width="343" height="20"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium20"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="ugc_tap_to_rate"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<button opaque="NO" tag="2" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4X3-Un-UJS" userLabel="Bad" customClass="MWMButton">
|
||||
<rect key="frame" x="111" y="50" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="3xz-Ow-9Nx"/>
|
||||
<constraint firstAttribute="width" constant="40" id="XKA-x9-f0y"/>
|
||||
</constraints>
|
||||
<state key="normal" image="rating_bad_light"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="imageName" value="rating_bad"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="tapOn:" destination="8mr-2l-jxR" eventType="touchUpInside" id="WTZ-dD-nM5"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" tag="5" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bXR-fe-qYg" userLabel="Excellent" customClass="MWMButton">
|
||||
<rect key="frame" x="279" y="50" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="40" id="Cgm-ht-N96"/>
|
||||
<constraint firstAttribute="height" constant="40" id="X8l-N8-xvB"/>
|
||||
</constraints>
|
||||
<state key="normal" image="rating_exellent_light"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="imageName" value="rating_exellent"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="tapOn:" destination="8mr-2l-jxR" eventType="touchUpInside" id="OXC-nG-pw3"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" tag="1" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3Bk-EL-pCJ" userLabel="Horrible" customClass="MWMButton">
|
||||
<rect key="frame" x="55" y="50" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="40" id="VIf-PR-ugc"/>
|
||||
<constraint firstAttribute="height" constant="40" id="ktC-gY-Zmf"/>
|
||||
</constraints>
|
||||
<state key="normal" title="" image="rating_horrible_light"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="imageName" value="rating_horrible"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="tapOn:" destination="8mr-2l-jxR" eventType="touchUpInside" id="TfX-fp-8dX"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" tag="4" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Pmi-8e-3lP" userLabel="Good" customClass="MWMButton">
|
||||
<rect key="frame" x="223" y="50" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="40" id="8gn-6v-WJ3"/>
|
||||
<constraint firstAttribute="height" constant="40" id="YpJ-9G-DMa"/>
|
||||
</constraints>
|
||||
<state key="normal" image="rating_good_light"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="imageName" value="rating_good"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="tapOn:" destination="8mr-2l-jxR" eventType="touchUpInside" id="N90-26-9Vy"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" tag="3" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Gpp-Dv-Guw" userLabel="Average" customClass="MWMButton">
|
||||
<rect key="frame" x="167" y="50" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="7vr-Wj-nvx"/>
|
||||
<constraint firstAttribute="width" constant="40" id="bT2-7K-MAj"/>
|
||||
</constraints>
|
||||
<state key="normal" image="rating_average_light"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="imageName" value="rating_average"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="tapOn:" destination="8mr-2l-jxR" eventType="touchUpInside" id="l4a-eu-er6"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Horrible" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DoU-La-K5J">
|
||||
<rect key="frame" x="55" y="98" width="39" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="gYS-80-26j"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular10"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackHintText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="ugc_horrible"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Bad" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3hX-1k-3h8">
|
||||
<rect key="frame" x="103" y="98" width="56" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="1M5-Gl-Ppg"/>
|
||||
<constraint firstAttribute="width" constant="56" id="nge-Pj-qmk"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular10"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackHintText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="ugc_bad"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Average" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vh2-4Z-J3k" userLabel="Average">
|
||||
<rect key="frame" x="159" y="98" width="56" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="56" id="dyI-nN-g7J"/>
|
||||
<constraint firstAttribute="height" constant="16" id="oNW-OJ-dux"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular10"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackHintText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="ugc_average"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Good" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="S6J-iV-4Rk" userLabel="Good">
|
||||
<rect key="frame" x="215" y="98" width="56" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="Xyn-Zb-Mwb"/>
|
||||
<constraint firstAttribute="width" constant="56" id="qwC-SD-XGc"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular10"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackHintText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="ugc_good"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Excellent" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="B6d-Mf-Eov">
|
||||
<rect key="frame" x="271" y="98" width="56" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="56" id="ATo-Op-ySH"/>
|
||||
<constraint firstAttribute="height" constant="16" id="cjD-fd-5rM"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular10"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackHintText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="ugc_excellent"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="B6d-Mf-Eov" firstAttribute="top" secondItem="bXR-fe-qYg" secondAttribute="bottom" constant="8" id="30M-e6-iM8"/>
|
||||
<constraint firstItem="DoU-La-K5J" firstAttribute="centerX" secondItem="3Bk-EL-pCJ" secondAttribute="centerX" id="36l-z9-UDX"/>
|
||||
<constraint firstAttribute="bottom" secondItem="DoU-La-K5J" secondAttribute="bottom" constant="24" id="3Hd-AV-iiJ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="fjZ-hn-8ng" secondAttribute="trailing" constant="16" id="5o3-tn-eRK"/>
|
||||
<constraint firstItem="fjZ-hn-8ng" firstAttribute="top" secondItem="29u-J5-Cmg" secondAttribute="top" constant="14" id="62E-qA-nyG"/>
|
||||
<constraint firstAttribute="bottom" secondItem="3hX-1k-3h8" secondAttribute="bottom" priority="750" constant="24" id="7hg-dl-56x"/>
|
||||
<constraint firstItem="B6d-Mf-Eov" firstAttribute="centerX" secondItem="bXR-fe-qYg" secondAttribute="centerX" id="Azb-73-2Ml"/>
|
||||
<constraint firstItem="Vh2-4Z-J3k" firstAttribute="centerX" secondItem="Gpp-Dv-Guw" secondAttribute="centerX" id="Djv-iU-fJu"/>
|
||||
<constraint firstItem="S6J-iV-4Rk" firstAttribute="top" secondItem="Pmi-8e-3lP" secondAttribute="bottom" constant="8" id="Hm2-2G-fb7"/>
|
||||
<constraint firstAttribute="bottom" secondItem="S6J-iV-4Rk" secondAttribute="bottom" priority="750" constant="24" id="J3B-uh-pxW"/>
|
||||
<constraint firstItem="Vh2-4Z-J3k" firstAttribute="top" secondItem="Gpp-Dv-Guw" secondAttribute="bottom" constant="8" id="Klh-mk-FQm"/>
|
||||
<constraint firstItem="fjZ-hn-8ng" firstAttribute="leading" secondItem="29u-J5-Cmg" secondAttribute="leading" constant="16" id="LRq-sK-SX7"/>
|
||||
<constraint firstItem="3hX-1k-3h8" firstAttribute="centerX" secondItem="4X3-Un-UJS" secondAttribute="centerX" id="Lgz-RD-yek"/>
|
||||
<constraint firstItem="Gpp-Dv-Guw" firstAttribute="top" secondItem="fjZ-hn-8ng" secondAttribute="bottom" priority="750" constant="16" id="O37-tN-tQP"/>
|
||||
<constraint firstItem="4X3-Un-UJS" firstAttribute="leading" secondItem="3Bk-EL-pCJ" secondAttribute="trailing" constant="16" id="OiI-OA-yP6"/>
|
||||
<constraint firstItem="Gpp-Dv-Guw" firstAttribute="leading" secondItem="4X3-Un-UJS" secondAttribute="trailing" constant="16" id="Pki-6J-dhV"/>
|
||||
<constraint firstItem="3hX-1k-3h8" firstAttribute="top" secondItem="4X3-Un-UJS" secondAttribute="bottom" constant="8" id="Xb5-Mb-DeZ"/>
|
||||
<constraint firstItem="4X3-Un-UJS" firstAttribute="centerY" secondItem="Gpp-Dv-Guw" secondAttribute="centerY" id="bmY-l8-HtD"/>
|
||||
<constraint firstItem="S6J-iV-4Rk" firstAttribute="centerX" secondItem="Pmi-8e-3lP" secondAttribute="centerX" id="dNp-PM-XWI"/>
|
||||
<constraint firstItem="Pmi-8e-3lP" firstAttribute="centerY" secondItem="Gpp-Dv-Guw" secondAttribute="centerY" id="e9m-R4-CNe"/>
|
||||
<constraint firstItem="bXR-fe-qYg" firstAttribute="centerY" secondItem="Gpp-Dv-Guw" secondAttribute="centerY" id="j9h-Oe-qPe"/>
|
||||
<constraint firstAttribute="bottom" secondItem="B6d-Mf-Eov" secondAttribute="bottom" priority="750" constant="24" id="oO2-HV-mZx"/>
|
||||
<constraint firstItem="Pmi-8e-3lP" firstAttribute="leading" secondItem="Gpp-Dv-Guw" secondAttribute="trailing" constant="16" id="oo2-mQ-4Ob"/>
|
||||
<constraint firstItem="bXR-fe-qYg" firstAttribute="leading" secondItem="Pmi-8e-3lP" secondAttribute="trailing" constant="16" id="pX2-L4-8EE"/>
|
||||
<constraint firstItem="Gpp-Dv-Guw" firstAttribute="centerX" secondItem="fjZ-hn-8ng" secondAttribute="centerX" id="rOF-pM-EVf"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Vh2-4Z-J3k" secondAttribute="bottom" priority="750" constant="24" id="wGB-Le-XQN"/>
|
||||
<constraint firstItem="DoU-La-K5J" firstAttribute="top" secondItem="3Bk-EL-pCJ" secondAttribute="bottom" constant="8" id="wep-Hp-ch1"/>
|
||||
<constraint firstItem="3Bk-EL-pCJ" firstAttribute="centerY" secondItem="Gpp-Dv-Guw" secondAttribute="centerY" id="xhj-rx-jvp"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
<connections>
|
||||
<outletCollection property="buttons" destination="3Bk-EL-pCJ" collectionClass="NSMutableArray" id="oDG-lJ-Zm3"/>
|
||||
<outletCollection property="buttons" destination="4X3-Un-UJS" collectionClass="NSMutableArray" id="HqF-A4-WZR"/>
|
||||
<outletCollection property="buttons" destination="Gpp-Dv-Guw" collectionClass="NSMutableArray" id="Rvf-SF-Fo8"/>
|
||||
<outletCollection property="buttons" destination="Pmi-8e-3lP" collectionClass="NSMutableArray" id="8ZR-jW-kwn"/>
|
||||
<outletCollection property="buttons" destination="bXR-fe-qYg" collectionClass="NSMutableArray" id="oXE-ze-177"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="30" y="80"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="rating_average_light" width="40" height="40"/>
|
||||
<image name="rating_bad_light" width="40" height="40"/>
|
||||
<image name="rating_exellent_light" width="40" height="40"/>
|
||||
<image name="rating_good_light" width="40" height="40"/>
|
||||
<image name="rating_horrible_light" width="40" height="40"/>
|
||||
</resources>
|
||||
</document>
|
|
@ -1,146 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="49" id="0N2-bg-mQ2" customClass="MWMUGCSpecificReviewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="0N2-bg-mQ2" id="kbz-UL-vv7">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="48"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Specification" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7zL-Tr-aCv">
|
||||
<rect key="frame" x="16" y="13" width="99" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular16"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<button opaque="NO" tag="5" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rR5-sh-1Ev" customClass="MWMButton">
|
||||
<rect key="frame" x="335" y="12" width="24" height="24"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="24" id="Axn-N1-hB3"/>
|
||||
<constraint firstAttribute="height" constant="24" id="kAI-WV-fpT"/>
|
||||
</constraints>
|
||||
<state key="normal" image="rating_star_light"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="imageName" value="rating_star"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="dragInside:" destination="0N2-bg-mQ2" eventType="touchDragInside" id="mYW-eX-sWx"/>
|
||||
<action selector="highlightOn:" destination="0N2-bg-mQ2" eventType="touchDown" id="lwa-F3-sly"/>
|
||||
<action selector="tapOn:" destination="0N2-bg-mQ2" eventType="touchUpInside" id="Cdw-rw-EY2"/>
|
||||
<action selector="touchingCanceledOn:" destination="0N2-bg-mQ2" eventType="touchDragOutside" id="pea-eC-c2q"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" tag="4" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="E91-tg-oef" customClass="MWMButton">
|
||||
<rect key="frame" x="305" y="13" width="24" height="24"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="24" id="OT0-GR-pYu"/>
|
||||
<constraint firstAttribute="width" constant="24" id="pGv-Gz-Q0s"/>
|
||||
</constraints>
|
||||
<state key="normal" image="rating_star_light"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="imageName" value="rating_star"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="dragInside:" destination="0N2-bg-mQ2" eventType="touchDragInside" id="pR4-6V-Fiw"/>
|
||||
<action selector="highlightOn:" destination="0N2-bg-mQ2" eventType="touchDown" id="l8Q-jP-rUa"/>
|
||||
<action selector="tapOn:" destination="0N2-bg-mQ2" eventType="touchUpInside" id="GZg-97-jx8"/>
|
||||
<action selector="touchingCanceledOn:" destination="0N2-bg-mQ2" eventType="touchDragOutside" id="YXy-Lm-4xc"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" tag="3" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mEu-Ee-BYt" customClass="MWMButton">
|
||||
<rect key="frame" x="275" y="13" width="24" height="24"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="24" id="McF-uF-0s0"/>
|
||||
<constraint firstAttribute="height" constant="24" id="Pcn-He-Vpf"/>
|
||||
</constraints>
|
||||
<state key="normal" image="rating_star_light"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="imageName" value="rating_star"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="dragInside:" destination="0N2-bg-mQ2" eventType="touchDragInside" id="ee7-36-Xzo"/>
|
||||
<action selector="highlightOn:" destination="0N2-bg-mQ2" eventType="touchDown" id="IXI-NS-iPS"/>
|
||||
<action selector="tapOn:" destination="0N2-bg-mQ2" eventType="touchUpInside" id="NZB-x5-5LZ"/>
|
||||
<action selector="touchingCanceledOn:" destination="0N2-bg-mQ2" eventType="touchDragOutside" id="LfI-FZ-qEh"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" tag="2" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rbx-TQ-1ee" customClass="MWMButton">
|
||||
<rect key="frame" x="245" y="13" width="24" height="24"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="24" id="FsX-hj-gK3"/>
|
||||
<constraint firstAttribute="height" constant="24" id="pVI-Iu-5Gs"/>
|
||||
</constraints>
|
||||
<state key="normal" image="rating_star_light"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="imageName" value="rating_star"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="dragInside:" destination="0N2-bg-mQ2" eventType="touchUpInside" id="G23-DH-tKR"/>
|
||||
<action selector="highlightOn:" destination="0N2-bg-mQ2" eventType="touchDown" id="dNc-Dk-JQP"/>
|
||||
<action selector="tapOn:" destination="0N2-bg-mQ2" eventType="touchUpInside" id="hPr-Lo-rpY"/>
|
||||
<action selector="touchingCanceledOn:" destination="0N2-bg-mQ2" eventType="touchDragOutside" id="Pek-hn-JrO"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" tag="1" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Tbw-OO-YyX" customClass="MWMButton">
|
||||
<rect key="frame" x="215" y="13" width="24" height="24"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="24" id="k1A-hb-bfW"/>
|
||||
<constraint firstAttribute="width" constant="24" id="usP-23-xrd"/>
|
||||
</constraints>
|
||||
<state key="normal" image="rating_star_light"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="imageName" value="rating_star"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="dragInside:" destination="0N2-bg-mQ2" eventType="touchDragInside" id="7JB-Av-BpN"/>
|
||||
<action selector="highlightOn:" destination="0N2-bg-mQ2" eventType="touchDown" id="LjJ-m3-kPl"/>
|
||||
<action selector="tapOn:" destination="0N2-bg-mQ2" eventType="touchUpInside" id="iLy-Y9-LwD"/>
|
||||
<action selector="touchingCanceledOn:" destination="0N2-bg-mQ2" eventType="touchDragOutside" id="PNt-N7-uPG"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="E91-tg-oef" firstAttribute="leading" secondItem="mEu-Ee-BYt" secondAttribute="trailing" constant="6" id="7dR-yP-dF0"/>
|
||||
<constraint firstItem="rbx-TQ-1ee" firstAttribute="leading" secondItem="Tbw-OO-YyX" secondAttribute="trailing" constant="6" id="GqU-OH-qho"/>
|
||||
<constraint firstItem="rR5-sh-1Ev" firstAttribute="leading" secondItem="E91-tg-oef" secondAttribute="trailing" constant="6" id="Sfy-2Z-jtC"/>
|
||||
<constraint firstItem="rbx-TQ-1ee" firstAttribute="centerY" secondItem="kbz-UL-vv7" secondAttribute="centerY" id="Spt-41-cPH"/>
|
||||
<constraint firstItem="7zL-Tr-aCv" firstAttribute="centerY" secondItem="kbz-UL-vv7" secondAttribute="centerY" id="Srz-p9-pJU"/>
|
||||
<constraint firstItem="Tbw-OO-YyX" firstAttribute="centerY" secondItem="kbz-UL-vv7" secondAttribute="centerY" id="c1D-nx-GIp"/>
|
||||
<constraint firstItem="7zL-Tr-aCv" firstAttribute="leading" secondItem="kbz-UL-vv7" secondAttribute="leading" constant="16" id="dS5-xF-O19"/>
|
||||
<constraint firstItem="E91-tg-oef" firstAttribute="centerY" secondItem="kbz-UL-vv7" secondAttribute="centerY" id="frD-pd-HK7"/>
|
||||
<constraint firstAttribute="trailing" secondItem="rR5-sh-1Ev" secondAttribute="trailing" constant="16" id="gQ7-OU-wse"/>
|
||||
<constraint firstItem="rR5-sh-1Ev" firstAttribute="centerY" secondItem="kbz-UL-vv7" secondAttribute="centerY" id="sJ7-JD-b07"/>
|
||||
<constraint firstItem="mEu-Ee-BYt" firstAttribute="leading" secondItem="rbx-TQ-1ee" secondAttribute="trailing" constant="6" id="uK1-R4-apC"/>
|
||||
<constraint firstItem="mEu-Ee-BYt" firstAttribute="centerY" secondItem="kbz-UL-vv7" secondAttribute="centerY" id="uhg-cg-TiJ"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="specification" destination="7zL-Tr-aCv" id="yEY-Xr-OSH"/>
|
||||
<outletCollection property="stars" destination="Tbw-OO-YyX" collectionClass="NSMutableArray" id="xO3-Tz-BzG"/>
|
||||
<outletCollection property="stars" destination="rbx-TQ-1ee" collectionClass="NSMutableArray" id="FfR-Vh-hZx"/>
|
||||
<outletCollection property="stars" destination="mEu-Ee-BYt" collectionClass="NSMutableArray" id="ao3-1f-Vy1"/>
|
||||
<outletCollection property="stars" destination="E91-tg-oef" collectionClass="NSMutableArray" id="W9v-ur-aTo"/>
|
||||
<outletCollection property="stars" destination="rR5-sh-1Ev" collectionClass="NSMutableArray" id="mwb-cj-yDx"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="24" y="22"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="rating_star_light" width="24" height="24"/>
|
||||
</resources>
|
||||
</document>
|
|
@ -1,63 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="269" id="heZ-rE-Fbm" customClass="MWMUGCTextReviewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="269"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="heZ-rE-Fbm" id="4Pj-Q3-q5z">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="268"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="TX5-r3-4kI" customClass="MWMTextView">
|
||||
<rect key="frame" x="16" y="16" width="343" height="236"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="236" id="Cfd-Ch-3ra"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits" autocapitalizationType="sentences" returnKeyType="done"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="placeholder" value="ugc_write_review"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="heZ-rE-Fbm" id="oS2-nD-XQZ"/>
|
||||
</connections>
|
||||
</textView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="501" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4JR-Is-ntd">
|
||||
<rect key="frame" x="317" y="231" width="42" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular12"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackHintText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="TX5-r3-4kI" secondAttribute="bottom" priority="750" constant="16" id="0ej-70-Rgj"/>
|
||||
<constraint firstItem="TX5-r3-4kI" firstAttribute="leading" secondItem="4Pj-Q3-q5z" secondAttribute="leading" constant="16" id="BlT-Cw-SOe"/>
|
||||
<constraint firstAttribute="bottom" secondItem="4JR-Is-ntd" secondAttribute="bottom" constant="16" id="Rx2-Zz-ujq"/>
|
||||
<constraint firstAttribute="trailing" secondItem="TX5-r3-4kI" secondAttribute="trailing" constant="16" id="VnF-zt-9CQ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="4JR-Is-ntd" secondAttribute="trailing" constant="16" id="YUP-YV-chQ"/>
|
||||
<constraint firstItem="TX5-r3-4kI" firstAttribute="top" secondItem="4Pj-Q3-q5z" secondAttribute="top" constant="16" id="oMx-nO-CdZ"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="countLabel" destination="4JR-Is-ntd" id="1g1-yP-lWl"/>
|
||||
<outlet property="textView" destination="TX5-r3-4kI" id="pzY-1A-5pL"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="31" y="151"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
Loading…
Add table
Reference in a new issue