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
class CustomButton: UIButton { | |
override func hitTest(point: CGPoint, withEvent event: UIEvent?) -> UIView? { | |
let newPoint = self.layer.presentationLayer()!.convertPoint(point, fromLayer: layer) | |
return super.hitTest(newPoint, withEvent: event) | |
} | |
} |
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
demoView.frame = CGRectMake(0, 0, 100, 100) | |
demoView.backgroundColor = UIColor.purpleColor() | |
self.backgroundColor = UIColor.greenColor() | |
UIView.animateWithDuration(3, delay: 0, options: [.CurveLinear, .AllowUserInteraction], | |
animations: { () -> Void in | |
self.backgroundColor = UIColor.grayColor() | |
self.demoView.center = CGPointMake(200, 200) | |
}) { (Bool) -> Void in |
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
demoView.frame = CGRectMake(0, 0, 100, 100) | |
demoView.backgroundColor = UIColor.purpleColor() | |
self.backgroundColor = UIColor.greenColor() | |
UIView.animateWithDuration(5.0) { () -> Void in | |
self.backgroundColor = UIColor.grayColor() | |
self.demoView.center = CGPointMake(100, 100) | |
} | |
puts("foo bar") |
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
class CreateUsers < ActiveRecord::Migration | |
def change | |
create_table :users do |t| | |
t.string :name | |
t.string :email | |
t.timestamps null: false | |
end | |
end | |
end |
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
# commit | |
git add --all | |
git commit -m "commit message" | |
# only run this for first time deploy | |
rake setup_github_pages | |
# deploy | |
rake generate && rake deploy |
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
<h5 class="date-time">{% include post/date.html %}<i class="icon-calendar"></i> {{ time }}</h5> |