Skip to content

Commit

Permalink
Merge branch 'iOS'
Browse files Browse the repository at this point in the history
  • Loading branch information
dain7672 committed Aug 30, 2017
2 parents 7a8194b + 0c477b5 commit 7443875
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 11 deletions.
10 changes: 8 additions & 2 deletions iOS/WoowaHanzo_iOS/WoowaHanzo_iOS/LikeButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,18 @@ class LikeButton: UIButton {
func buttonTouched(){
if let image = self.currentImage, image == #imageLiteral(resourceName: "emptyHeard") {
self.setImage(#imageLiteral(resourceName: "heartBlue_Final"), for: .normal)
self.label.text = "\(num + 1)"
self.label.text = "\(num + 1)"
num = num + 1
self.label.sizeToFit()

} else {
self.setImage(#imageLiteral(resourceName: "emptyHeard"), for: .normal)
self.label.text = "\(num - 1)"
self.label.text = "\(num - 1)"
num = num - 1
if num == 0{
self.label.text = ""
}
self.label.sizeToFit()
}
FirebaseModel().likeRequest(postId: postkey)
print("\(postkey) - pressed")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ class MainPageViewController: UIViewController,NVActivityIndicatorViewable{
let numstring = notification.userInfo?["num"] as? String ?? ""
let button = notification.userInfo?["button"] as? LikeButton ?? nil
if numstring == "0"{
label?.text = ""
label?.text = " "
button?.num = 0
}
else{
label?.text = numstring
label?.text = "\(numstring)"
button?.num = Int(numstring)!
label?.sizeToFit()
}
Expand Down
2 changes: 2 additions & 0 deletions iOS/WoowaHanzo_iOS/WoowaHanzo_iOS/MyInfoView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class MyInfoView : UIView{
profileImageView.image = UIImage(named: "profile.png")
profileImageView.frame = CGRect(x: 147, y: 37, width: 120, height: 120)
profileImageView.frame.origin.x = self.frame.width / 2 - profileImageView.frame.width / 2
profileImageView.contentMode = .scaleAspectFill
profileImageView.clipsToBounds = true

nickNameLabel.frame = CGRect(x: 147, y: 167, width: 120, height: 21)
sayHiLabel.frame = CGRect(x: 186 , y: 190, width: 42, height: 22)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ class MyPageViewController: UIViewController,NVActivityIndicatorViewable {
button?.num = 0
}
else{
label?.text = numstring
label?.text = "\(numstring)"
button?.num = Int(numstring)!
label?.sizeToFit()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class NickNameClickResultViewController: UIViewController,NVActivityIndicatorVie
button?.num = 0
}
else{
label?.text = numstring
label?.text = "\(numstring)"
button?.num = Int(numstring)!
label?.sizeToFit()
}
Expand Down
3 changes: 2 additions & 1 deletion iOS/WoowaHanzo_iOS/WoowaHanzo_iOS/RankListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ class RankListView: UIScrollView {
likenumlabel.text = String(describing: rankuser.likes!)
likenumlabel.textAlignment = NSTextAlignment.center
likenumlabel.font = UIFont(name: "NotoSansUI", size: 14.0)!
likenumlabel.textColor = UIColor(red: 70/255, green: 70/255, blue: 70/255, alpha: 1.0)
likenumlabel.sizeToFit()
likenumlabel.frame.origin = CGPoint(x:heartimgview.frame.origin.x - likenumlabel.frame.width - 10, y : 30)
likenumlabel.frame.origin = CGPoint(x:heartimgview.frame.origin.x - likenumlabel.frame.width - 5, y : 30)
cellview.addSubview(likenumlabel)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Vic-FS-pyA">
<rect key="frame" x="0.0" y="0.0" width="100" height="100"/>
<color key="backgroundColor" red="0.90196079019999997" green="0.90196079019999997" blue="0.90196079019999997" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" name="HelveticaNeue-LightItalic" family="Helvetica Neue" pointSize="43"/>
<fontDescription key="fontDescription" name="Menlo-Regular" family="Menlo" pointSize="48"/>
<state key="normal" title="+">
<color key="titleColor" red="0.7019608021" green="0.7019608021" blue="0.7019608021" alpha="1" colorSpace="calibratedRGB"/>
</state>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class TagResultViewController: UIViewController,NVActivityIndicatorViewable {
button?.num = 0
}
else{
label?.text = numstring
label?.text = "\(numstring)"
button?.num = Int(numstring)!
label?.sizeToFit()
}
Expand Down
5 changes: 3 additions & 2 deletions iOS/WoowaHanzo_iOS/WoowaHanzo_iOS/UserListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class UserListView: UIScrollView {
inypos = Int(lastview.frame.origin.y) + Int(lastview.frame.size.height) + 0

//tagListview//////////////////////////////////////
let tagListView = TagPageView2(frame: CGRect(x: inxpos - 10, y: inypos, width: Int(cellview.frame.width), height: 70)) // taglistview2 파일에 있다.
let tagListView = TagPageView2(frame: CGRect(x: inxpos - 10, y: inypos, width: Int(cellview.frame.width)-20, height: 70)) // taglistview2 파일에 있다.
if let tags = user.tags{
for i in tags{
tagListView.addTag(text: "#"+i, target: self, backgroundColor: UIColor.white, textColor: color)
Expand Down Expand Up @@ -193,8 +193,9 @@ class UserListView: UIScrollView {
let likenumLabel = UILabel()
let likebutton = LikeButton()

likenumLabel.text = ""
likenumLabel.text = " "
likenumLabel.font = UIFont(name:"NotoSansUI", size: 14.0)
likenumLabel.textColor = UIColor(red: 153/255, green: 153/255, blue: 153/255, alpha: 1.0)
likenumLabel.frame.origin = CGPoint(x: 53, y:inypos + 4)
cellview.addSubview(likenumLabel)

Expand Down

0 comments on commit 7443875

Please sign in to comment.