Skip to content

Commit

Permalink
170829 별 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
wooooooong committed Aug 28, 2017
1 parent 0911687 commit b93f191
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 28 deletions.
47 changes: 25 additions & 22 deletions iOSProject/pyunrihae/pyunrihae/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<scene sceneID="xtN-fi-hkD">
<objects>
<navigationController useStoryboardIdentifierAsRestorationIdentifier="YES" navigationBarHidden="YES" id="ivr-CL-MQp" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="a0R-9B-fNe">
<navigationBar key="navigationBar" contentMode="scaleToFill" misplaced="YES" id="a0R-9B-fNe">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
Expand Down Expand Up @@ -592,7 +592,7 @@
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="253" translatesAutoresizingMaskIntoConstraints="NO" id="cly-4C-f2a">
<rect key="frame" x="185" y="57" width="80" height="21"/>
<rect key="frame" x="183" y="57" width="80" height="21"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="E4e-y2-Xbg"/>
<constraint firstAttribute="width" constant="80" id="pgC-9e-AWc"/>
Expand Down Expand Up @@ -664,7 +664,7 @@
<constraint firstItem="yK6-Sy-hLu" firstAttribute="top" secondItem="cly-4C-f2a" secondAttribute="top" id="anM-8a-QDJ"/>
<constraint firstItem="nuP-SV-grC" firstAttribute="leading" secondItem="D3A-qB-grp" secondAttribute="trailing" constant="15" id="czG-EW-Sfu"/>
<constraint firstItem="PLx-iE-b3f" firstAttribute="leading" secondItem="q0B-Uv-CQ7" secondAttribute="trailing" constant="5" id="d80-yZ-XCh"/>
<constraint firstItem="yK6-Sy-hLu" firstAttribute="leading" secondItem="cly-4C-f2a" secondAttribute="trailing" constant="8" id="f8Z-rA-ZBA"/>
<constraint firstItem="yK6-Sy-hLu" firstAttribute="leading" secondItem="cly-4C-f2a" secondAttribute="trailing" constant="10" id="f8Z-rA-ZBA"/>
<constraint firstItem="ILA-6R-yMQ" firstAttribute="leading" secondItem="ylF-Bu-Y03" secondAttribute="leadingMargin" constant="11" id="grN-em-pAm"/>
<constraint firstItem="nxo-bd-EGt" firstAttribute="leading" secondItem="5Qe-nm-Vek" secondAttribute="trailing" constant="31" id="hXe-lv-AmJ"/>
<constraint firstItem="yK6-Sy-hLu" firstAttribute="trailing" secondItem="ylF-Bu-Y03" secondAttribute="trailingMargin" id="lgR-IV-x3f"/>
Expand All @@ -674,7 +674,7 @@
<constraint firstItem="5Qe-nm-Vek" firstAttribute="leading" secondItem="ylF-Bu-Y03" secondAttribute="leading" constant="4" id="wWr-Ew-iPc"/>
<constraint firstItem="JvE-m9-zGk" firstAttribute="top" secondItem="ylF-Bu-Y03" secondAttribute="topMargin" constant="17" id="wn1-nO-sfq"/>
<constraint firstItem="q0B-Uv-CQ7" firstAttribute="leading" secondItem="5Qe-nm-Vek" secondAttribute="trailing" id="xif-YJ-XAg"/>
<constraint firstItem="cly-4C-f2a" firstAttribute="leading" secondItem="Zop-Rl-KJb" secondAttribute="trailing" constant="5" id="ysE-2H-c5P"/>
<constraint firstItem="cly-4C-f2a" firstAttribute="leading" secondItem="Zop-Rl-KJb" secondAttribute="trailing" constant="3" id="ysE-2H-c5P"/>
<constraint firstItem="Zop-Rl-KJb" firstAttribute="leading" secondItem="q0B-Uv-CQ7" secondAttribute="trailing" constant="8" id="z8i-Xh-Htg"/>
<constraint firstItem="JvE-m9-zGk" firstAttribute="leading" secondItem="ylF-Bu-Y03" secondAttribute="leadingMargin" constant="2" id="zqq-y1-0Bh"/>
</constraints>
Expand Down Expand Up @@ -948,12 +948,6 @@
<color key="textColor" red="1" green="0.47061997649999998" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" layoutMarginsFollowReadableWidth="YES" text="4.31" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="orv-4S-YX2">
<rect key="frame" x="329" y="20" width="28" height="16"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
<color key="textColor" red="1" green="0.47061997649999998" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="251" layoutMarginsFollowReadableWidth="YES" text="적당" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Px1-gv-3Q7">
<rect key="frame" x="312" y="67" width="45" height="17"/>
<constraints>
Expand Down Expand Up @@ -982,35 +976,44 @@
<color key="titleColor" red="1" green="0.47058823529411764" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="O34-GD-I7A">
<rect key="frame" x="205" y="21" width="79" height="15"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" layoutMarginsFollowReadableWidth="YES" text="4.31" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="orv-4S-YX2">
<rect key="frame" x="322" y="19" width="35" height="16"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="7pl-yo-OIZ"/>
<constraint firstAttribute="width" constant="79" id="hI0-hQ-zbj"/>
<constraint firstAttribute="width" constant="35" id="0HU-Ka-Sph"/>
<constraint firstAttribute="height" constant="16" id="1qE-ST-mSn"/>
</constraints>
</view>
<fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
<color key="textColor" red="1" green="0.47061997649999998" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="rld-Hj-nwR">
<rect key="frame" x="236" y="19" width="80" height="21"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="4OL-8U-ujf"/>
<constraint firstAttribute="width" constant="80" id="ckL-wA-y9r"/>
</constraints>
</imageView>
</subviews>
<constraints>
<constraint firstAttribute="bottomMargin" secondItem="EIo-b3-feh" secondAttribute="bottom" constant="3.6666666666666572" id="00A-hR-nqH"/>
<constraint firstItem="sus-Zi-hSx" firstAttribute="top" secondItem="Qq6-OC-Ey9" secondAttribute="bottom" constant="7" id="2IL-k8-Os2"/>
<constraint firstItem="Qq6-OC-Ey9" firstAttribute="top" secondItem="BRW-gA-aWd" secondAttribute="bottom" constant="7" id="4bl-Xo-fIM"/>
<constraint firstItem="orv-4S-YX2" firstAttribute="leading" secondItem="O34-GD-I7A" secondAttribute="trailing" constant="45" id="4zW-aL-MXY"/>
<constraint firstItem="Wgy-sd-NF0" firstAttribute="top" secondItem="Px1-gv-3Q7" secondAttribute="bottom" constant="7" id="C0E-SE-pWx"/>
<constraint firstItem="rld-Hj-nwR" firstAttribute="top" secondItem="oTu-zk-F13" secondAttribute="topMargin" constant="11" id="Cr7-Dt-bHp"/>
<constraint firstAttribute="trailingMargin" secondItem="rld-Hj-nwR" secondAttribute="trailing" constant="51" id="D1E-MZ-yxr"/>
<constraint firstAttribute="trailingMargin" secondItem="coX-Gl-Ppg" secondAttribute="trailing" constant="10" id="EbS-Vr-WBc"/>
<constraint firstAttribute="bottom" secondItem="Wgy-sd-NF0" secondAttribute="bottom" constant="45.666666666666657" id="JpE-YI-Rbm"/>
<constraint firstItem="Wgy-sd-NF0" firstAttribute="leading" secondItem="oPQ-f2-TDP" secondAttribute="leading" id="JwV-uZ-X6t"/>
<constraint firstItem="oPQ-f2-TDP" firstAttribute="baseline" secondItem="Qq6-OC-Ey9" secondAttribute="firstBaseline" id="JzM-H7-QCk"/>
<constraint firstItem="oPQ-f2-TDP" firstAttribute="top" secondItem="orv-4S-YX2" secondAttribute="bottom" constant="7" id="LlK-6D-gGP"/>
<constraint firstItem="Wgy-sd-NF0" firstAttribute="trailing" secondItem="Px1-gv-3Q7" secondAttribute="trailing" id="NnW-CB-nuB"/>
<constraint firstItem="Qq6-OC-Ey9" firstAttribute="leading" secondItem="EIo-b3-feh" secondAttribute="leading" id="Q3a-1K-sp7"/>
<constraint firstItem="Wgy-sd-NF0" firstAttribute="trailing" secondItem="orv-4S-YX2" secondAttribute="trailing" id="XZu-e5-5rT"/>
<constraint firstItem="Wgy-sd-NF0" firstAttribute="trailing" secondItem="coX-Gl-Ppg" secondAttribute="trailing" id="iUh-w7-fFS"/>
<constraint firstItem="orv-4S-YX2" firstAttribute="top" secondItem="oTu-zk-F13" secondAttribute="topMargin" constant="11" id="jPZ-zE-NTh"/>
<constraint firstItem="coX-Gl-Ppg" firstAttribute="top" secondItem="Wgy-sd-NF0" secondAttribute="bottom" constant="7" id="kD5-Rc-Sdq"/>
<constraint firstItem="Qq6-OC-Ey9" firstAttribute="leading" secondItem="D9K-Pc-FZp" secondAttribute="leading" id="mxx-yK-VHA"/>
<constraint firstItem="D9K-Pc-FZp" firstAttribute="top" secondItem="sus-Zi-hSx" secondAttribute="bottom" constant="7" id="o7d-YN-lwb"/>
<constraint firstItem="Qq6-OC-Ey9" firstAttribute="leading" secondItem="sus-Zi-hSx" secondAttribute="leading" id="oOT-Fk-1oX"/>
<constraint firstItem="O34-GD-I7A" firstAttribute="top" secondItem="oTu-zk-F13" secondAttribute="topMargin" constant="13" id="skq-lj-CCF"/>
<constraint firstAttribute="trailingMargin" secondItem="orv-4S-YX2" secondAttribute="trailing" constant="10" id="r1x-C0-064"/>
<constraint firstItem="Qq6-OC-Ey9" firstAttribute="leading" secondItem="BRW-gA-aWd" secondAttribute="leading" id="v4r-AL-jUZ"/>
<constraint firstItem="Qq6-OC-Ey9" firstAttribute="leading" secondItem="oTu-zk-F13" secondAttribute="leadingMargin" constant="10" id="wHC-tb-0bo"/>
<constraint firstItem="Px1-gv-3Q7" firstAttribute="top" secondItem="oPQ-f2-TDP" secondAttribute="bottom" constant="7" id="zhv-ym-vpQ"/>
Expand All @@ -1022,7 +1025,7 @@
<outlet property="gradeLabel" destination="orv-4S-YX2" id="sl5-lE-XpY"/>
<outlet property="priceLevelLabel" destination="oPQ-f2-TDP" id="9aG-0p-vpg"/>
<outlet property="quantityLevelLabel" destination="Wgy-sd-NF0" id="gf3-Nu-IXo"/>
<outlet property="starView" destination="O34-GD-I7A" id="lS3-vF-xyP"/>
<outlet property="starImageView" destination="rld-Hj-nwR" id="grb-Qn-pvB"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" rowHeight="235" id="dxE-em-sid" customClass="ProductReviewTableViewCell" customModule="pyunrihae" customModuleProvider="target">
Expand Down Expand Up @@ -3029,7 +3032,7 @@
<objects>
<navigationController storyboardIdentifier="mainNavigationController" automaticallyAdjustsScrollViewInsets="NO" useStoryboardIdentifierAsRestorationIdentifier="YES" id="9cE-6F-aqE" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="Fmm-Zd-Qc7">
<navigationBar key="navigationBar" contentMode="scaleToFill" misplaced="YES" id="Fmm-Zd-Qc7">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
Expand Down
4 changes: 2 additions & 2 deletions iOSProject/pyunrihae/pyunrihae/DataManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -560,9 +560,9 @@ class DataManager{
let storage = Storage.storage()

let storageRef = storage.reference(forURL: "gs://pyeonrehae.appspot.com")
let imagesRef = storageRef.child("images/" + user.id + ".png")
let imagesRef = storageRef.child("images/" + user.id + ".jpeg")

if let data = UIImagePNGRepresentation(profile) {
if let data = UIImageJPEGRepresentation(profile, 0.3) {
imagesRef.putData(data, metadata: nil, completion: {
(metadata, error) in
if error != nil {
Expand Down
2 changes: 2 additions & 0 deletions iOSProject/pyunrihae/pyunrihae/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,13 @@ class MainViewController: UIViewController {
self.selectedCategoryIndex = sender.tag
},completion: nil)
NotificationCenter.default.post(name: NSNotification.Name("showCategory"), object: self, userInfo: ["category" : selectedCategoryIndex])
productScrollView.contentOffset.x = 0
}
// 카테고리를 선택했을 때 함수
func selectCategory(_ notification: Notification){
Button.selectCategory(view: self.view, previousIndex: selectedCategoryIndex, categoryBtns: categoryBtns, selectedCategoryIndex: notification.userInfo?["category"] as! Int, categoryScrollView: categoryScrollView, scrollBar: scrollBar)
selectedCategoryIndex = notification.userInfo?["category"] as! Int
productScrollView.contentOffset.x = 0
}
// 로딩 인디케이터 보이는 함수 DEPRECATED
func showActivityIndicatory() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
import UIKit
class ProductDetailInfoTableViewCell: UITableViewCell {
@IBOutlet weak var allergyBtn: UIButton!
@IBOutlet weak var starView: UIView!
@IBOutlet weak var gradeLabel: UILabel!
@IBOutlet weak var quantityLevelLabel: UILabel!
@IBOutlet weak var flavorLevelLabel: UILabel!
@IBOutlet weak var priceLevelLabel: UILabel!
@IBOutlet weak var starImageView: UIImageView!
override func awakeFromNib() {
super.awakeFromNib()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ extension ProductDetailViewController: UITableViewDataSource, UITableViewDelegat
let cell = tableView.dequeueReusableCell(withIdentifier: "DetailCell", for: indexPath) as! ProductDetailInfoTableViewCell
// 제품 별점 보여주기
DataManager.getProductById(id: SelectedProduct.foodId) { (product) in
Image.drawStar(numberOfPlaces: 2.0, grade_avg: Double(product.grade_avg), gradeLabel: cell.gradeLabel, starView: cell.starView, needSpace: true)
Image.drawStar(numberOfPlaces: 2.0, grade_avg: Double(product.grade_avg), gradeLabel: cell.gradeLabel, starView: cell.starImageView)
let allergyList = product.allergy
if allergyList.count != 0 {
let allergy = allergyList[0]
Expand Down Expand Up @@ -338,7 +338,8 @@ extension ProductDetailViewController: UITableViewDataSource, UITableViewDelegat
cell.userImageLoading.startAnimating()
cell.usefulBtn.tag = usefulBtns.count - 1
cell.badBtn.tag = badBtns.count - 1
cell.userImage.contentMode = .scaleAspectFit
cell.userImage.contentMode = .scaleAspectFill
cell.userImage.clipsToBounds = true
cell.userImage.af_setImage(withURL: URL(string: reviewList[row].user_image)!, placeholderImage: UIImage(), imageTransition: .crossDissolve(0.2), completion:{ image in
cell.userImageLoading.stopAnimating()
})
Expand Down
Loading

0 comments on commit b93f191

Please sign in to comment.