@IBAction func loginButtonDidCicked(sender: AnyObject?) {
performSegueWithIdentifier("loginDialogSegue", sender: self)
}
Delegation, which two View Controllers to communicate with each other
| import UIKit | |
| extension UILabel { | |
| func setAttributedTextString(string: String) { | |
| self.attributedText = NSAttributedString(string: string, attributes: self.attributedText.attributesAtIndex(0, effectiveRange: nil)) | |
| } | |
| func setKern(kern: CGFloat) { | |
| var attributes = self.attributedText.attributesAtIndex(0, effectiveRange: nil) |
@IBAction func loginButtonDidCicked(sender: AnyObject?) {
performSegueWithIdentifier("loginDialogSegue", sender: self)
}
Delegation, which two View Controllers to communicate with each other
| // | |
| // ViewController.swift | |
| // SwiftAutoLayout | |
| // | |
| // Created by Steven Lipton on 7/24/14. | |
| // Copyright (c) 2014 Steven Lipton. All rights reserved. | |
| // | |
| import UIKit | |
| <!-- http://www.html5rocks.com/en/tutorials/file/dndfiles/#toc-reading-files --> | |
| <script> | |
| function handleFileSelect(evt) { | |
| var files = evt.target.files; // FileList object | |
| // Loop through the FileList and render image files as thumbnails. | |
| for (var i = 0, f; f = files[i]; i++) { | |
| // Only process image files. |
1, git remote -v, check remote links
origin https://github.com/rmajmudar/popinshop.git (fetch)
origin https://github.com/rmajmudar/popinshop.git (push)
2, git remote rm origin, remove old remote links
3, git remote -v, check remote links, it should be empty now.
4, git remote add origin https://github.com/linyingkui/popinshop.git, add new remote links
Follow heroku tutorials:
https://devcenter.heroku.com/articles/getting-started-with-rails4
1, new rails app
rails new albertly --database=postgresql
2, setup the database
1, A layer is just a container for managing a bitmap image
2,The job of a view controller is to manage a view hierarchy
3, The viewWillLayoutSubviews method is also called after the view is resized and positioned by its parent. When a view's bounds change, the view adjusts the position of its subviews.
4, A view controller: resizes and lays out its views, adjusts the contents of the views, acts on behalf of the views when the user interacts with them
1, read changes
git diff difference between current codes and HEAD codes
git diff HEAD the same as git diff
git diff HEAD^^ two commits before HEAD
git diff HEAD~5 five commits before HEAD
| // temp | |
| func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) { | |
| let mixpanel = Mixpanel.sharedInstance() | |
| if let user = LUVApi.sharedInstance().currentUser { | |
| mixpanel.identify(user.id) | |
| mixpanel.people.addPushDeviceToken(deviceToken) | |
| } | |
| } |