Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fail to fold Xcode 7.1.1 on open #1

Open
Fred-J opened this issue Dec 3, 2015 · 0 comments
Open

fail to fold Xcode 7.1.1 on open #1

Fred-J opened this issue Dec 3, 2015 · 0 comments

Comments

@Fred-J
Copy link

Fred-J commented Dec 3, 2015

once xCode started and opened the swift code below, HCTAutoFolding failed to auto fold the functions inside the class;

import UIKit

class ViewController: UIViewController {

@IBOutlet weak var myLabel: UILabel!
@IBOutlet var parentView: UIView!
var swipGestureRight: UISwipeGestureRecognizer!
var swipGestureLeft: UISwipeGestureRecognizer!

override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view, typically from a nib.
    myLabel.userInteractionEnabled = true

    swipGestureLeft = UISwipeGestureRecognizer(target: self, action: Selector("swipViewLeft:"))
    swipGestureLeft.direction = .Left
    parentView.gestureRecognizers = [swipGestureLeft]
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}

func swipViewLeft(gesture: UISwipeGestureRecognizer) {
    UIView.animateWithDuration(0.3, animations: {self.myLabel.center.x -= (self.myLabel.bounds.width)}, completion: nil)
    swipGestureRight = UISwipeGestureRecognizer(target: self, action: Selector("swipViewRight:"))
    swipGestureRight.direction = .Right
    parentView.gestureRecognizers = [swipGestureRight]
}

func swipViewRight(gesture: UISwipeGestureRecognizer) {
    UIView.animateWithDuration(0.3, animations: {self.myLabel.center.x += (self.myLabel.bounds.width)}, completion: nil)
    swipGestureLeft = UISwipeGestureRecognizer(target: self, action: Selector("swipViewLeft:"))
    swipGestureLeft.direction = .Left
    parentView.gestureRecognizers = [swipGestureLeft]
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant