mirror of
https://github.com/wahyd4/Yep.git
synced 2026-08-28 06:08:33 +10:00
New way to go report
This commit is contained in:
+1
-1
@@ -40,7 +40,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>155</string>
|
||||
<string>156</string>
|
||||
<key>Fabric</key>
|
||||
<dict>
|
||||
<key>APIKey</key>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import UIKit
|
||||
import RealmSwift
|
||||
|
||||
class FeedsViewController: UIViewController {
|
||||
class FeedsViewController: BaseViewController {
|
||||
|
||||
var skill: Skill?
|
||||
|
||||
@@ -143,6 +143,10 @@ class FeedsViewController: UIViewController {
|
||||
deinit {
|
||||
print("Deinit FeedsViewControler")
|
||||
}
|
||||
|
||||
override func viewDidAppear(animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
@@ -35,18 +35,6 @@ class FeedCell: UITableViewCell {
|
||||
var touchesBeganAction: (UITableViewCell -> Void)?
|
||||
var touchesEndedAction: (UITableViewCell -> Void)?
|
||||
var touchesCancelledAction: (UITableViewCell -> Void)?
|
||||
|
||||
var tapGesture: UITapGestureRecognizer!
|
||||
|
||||
func setup() {
|
||||
tapGesture = UITapGestureRecognizer(target: self, action: "doTap")
|
||||
}
|
||||
|
||||
func doTap() {
|
||||
if let touchesEndedAction = touchesEndedAction {
|
||||
touchesEndedAction(self)
|
||||
}
|
||||
}
|
||||
|
||||
var attachments = [DiscoveredAttachment]() {
|
||||
didSet {
|
||||
@@ -88,7 +76,6 @@ class FeedCell: UITableViewCell {
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
|
||||
setup()
|
||||
nicknameLabel.textColor = UIColor.yepTintColor()
|
||||
messageTextView.textColor = UIColor.yepMessageColor()
|
||||
distanceLabel.textColor = UIColor.grayColor()
|
||||
@@ -124,6 +111,9 @@ class FeedCell: UITableViewCell {
|
||||
}
|
||||
messageTextView.touchesEndedAction = { [weak self] in
|
||||
if let strongSelf = self {
|
||||
if strongSelf.editing {
|
||||
return
|
||||
}
|
||||
strongSelf.touchesEndedAction?(strongSelf)
|
||||
}
|
||||
}
|
||||
@@ -140,12 +130,14 @@ class FeedCell: UITableViewCell {
|
||||
}
|
||||
}
|
||||
|
||||
backgroundView.addGestureRecognizer(tapGesture)
|
||||
// backgroundView.touchesEndedAction = { [weak self] in
|
||||
// if let strongSelf = self {
|
||||
//// strongSelf.touchesEndedAction?(strongSelf)
|
||||
// }
|
||||
// }
|
||||
backgroundView.touchesEndedAction = { [weak self] in
|
||||
if let strongSelf = self {
|
||||
if strongSelf.editing {
|
||||
return
|
||||
}
|
||||
strongSelf.touchesEndedAction?(strongSelf)
|
||||
}
|
||||
}
|
||||
backgroundView.touchesCancelledAction = { [weak self] in
|
||||
if let strongSelf = self {
|
||||
strongSelf.touchesCancelledAction?(strongSelf)
|
||||
|
||||
@@ -10,29 +10,6 @@ import UIKit
|
||||
|
||||
class FeedTextView: UITextView {
|
||||
|
||||
var tapGesture: UITapGestureRecognizer!
|
||||
|
||||
override init(frame: CGRect, textContainer: NSTextContainer?) {
|
||||
super.init(frame: frame, textContainer: textContainer)
|
||||
setup()
|
||||
}
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
setup()
|
||||
}
|
||||
|
||||
func setup() {
|
||||
tapGesture = UITapGestureRecognizer(target: self, action: "doTap")
|
||||
addGestureRecognizer(tapGesture)
|
||||
}
|
||||
|
||||
func doTap() {
|
||||
if let touchesEndedAction = touchesEndedAction {
|
||||
touchesEndedAction()
|
||||
}
|
||||
}
|
||||
|
||||
override func canBecomeFirstResponder() -> Bool {
|
||||
return false
|
||||
}
|
||||
@@ -48,7 +25,7 @@ class FeedTextView: UITextView {
|
||||
|
||||
override func touchesEnded(touches: Set<UITouch>, withEvent event: UIEvent?) {
|
||||
super.touchesEnded(touches, withEvent: event)
|
||||
// touchesEndedAction?()
|
||||
touchesEndedAction?()
|
||||
}
|
||||
|
||||
override func touchesCancelled(touches: Set<UITouch>?, withEvent event: UIEvent?) {
|
||||
|
||||
Reference in New Issue
Block a user