This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func touchesMoved(touches: Set<NSObject>, withEvent event: UIEvent) { | |
let location:CGPoint? = touches.anyObject()?.locationInView(self) | |
if let loc = location { | |
if (!CGRectContainsPoint(ScaleRect(self.bounds, n: 2.0), loc)) | |
{ | |
self.highlighted = false | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func touchesMoved(touches: Set<NSObject>, withEvent event: UIEvent) { | |
if let touch = touches.first as? UITouch { | |
let location = touch.locationInView(self) | |
if (!CGRectContainsPoint(ScaleRect(self.bounds, n: 2.0), location)) | |
{ | |
self.highlighted = false | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func itemTouched(item: PathMenuItem) { | |
let tag: Int = self.flag! | |
if (item.tag == 1000) { | |
println("item1 touched") | |
ViewController().goToNextView() | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@IBAction func goToNextView() { | |
println("test") | |
self.performSegueWithIdentifier("test", sender:self) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@IBInspectable var backgroundImage: UIImage? { | |
didSet { | |
frontSideView.backgroundColor = UIColor(patternImage: UIImage(named: "product-title")!) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@IBInspectable var backgroundImage: UIImage = UIImage() { | |
didSet { | |
self.frontSideView.backgroundColor = UIColor(patternImage: UIImage(named: "product-title")!) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private let iconImageView = UIView() | |
internal var iconImage: UIImageView! | |
@IBInspectable var imageName: String { | |
didSet { | |
self.imageTitle.text = imageName | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private let iconImageView = UIView() | |
internal var iconImage: UIImageView! | |
@IBInspectable var imageName: String { | |
didSet { | |
self.imageTitle.text = imageName | |
} | |
} | |
@IBInspectable var backgroundImage: UIImage = UIImage() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convenience init() { | |
let sessionConfig:NSURLSessionConfiguration = NSURLSessionConfiguration.defaultSessionConfiguration() | |
sessionConfig.allowsCellularAccess = true | |
sessionConfig.HTTPAdditionalHeaders = ["Content-Type": "application/json"] | |
sessionConfig.timeoutIntervalForRequest = 30 | |
sessionConfig.timeoutIntervalForResource = 60 | |
sessionConfig.HTTPMaximumConnectionsPerHost = 1 | |
self.init() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let socket = SocketIOClient(socketURL: "192.168.1.19:5260") | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
self.socket.connect() | |
} |
OlderNewer