This file contains hidden or 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
| $body = file_get_contents('php://input'); | |
| $customer = $body['customer']; | |
| ini_set("log_errors", 1); | |
| ini_set("error_log", "$root/php-error.log"); | |
| error_log(print_r($customer, true)); |
This file contains hidden or 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
| Optional({"right":{"test2":"test2","test1":"test1"},"wrong":[{"test2":"test2","test1":"test1"},{"test2":"test2","test1":"test1"}],"again_right":{"dummy2":{"test2":"test2","test1":"test1"},"dummy1":{"test2":"test2","test1":"test1"}},"again_wrong":[{"test2":"test2","test1":"test1"},{"test2":"test2","test1":"test1"}]}) |
This file contains hidden or 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
| Optional(again_right%5Bdummy2%5D%5Btest2%5D=test2&again_right%5Bdummy2%5D%5Btest1%5D=test1&again_right%5Bdummy1%5D%5Btest2%5D=test2&again_right%5Bdummy1%5D%5Btest1%5D=test1&again_wrong%5B%5D%5Btest2%5D=test2&again_wrong%5B%5D%5Btest1%5D=test1&again_wrong%5B%5D%5Btest2%5D=test2&again_wrong%5B%5D%5Btest1%5D=test1&right%5Btest2%5D=test2&right%5Btest1%5D=test1&wrong%5B%5D%5Btest2%5D=test2&wrong%5B%5D%5Btest1%5D=test1&wrong%5B%5D%5Btest2%5D=test2&wrong%5B%5D%5Btest1%5D=test1) |
This file contains hidden or 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
| var currentSelectedAddress: Address? { | |
| get { | |
| if currentSelectedAddress == nil { | |
| return (addresses.count > 0) ? addresses.first : nil | |
| } | |
| return currentSelectedAddress | |
| } | |
| set { ///??? | |
This file contains hidden or 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
| UIView.beginAnimations(nil, context: nil) | |
| UIView.setAnimationDuration(1) | |
| UIView.setAnimationCurve(UIViewAnimationCurve.EaseIn) | |
| let radians = CGFloat(180 * M_PI / 180) | |
| arrowImageView.transform = CGAffineTransformMakeRotation(radians) | |
| UIView.commitAnimations() |
This file contains hidden or 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
| UIView.animateWithDuration(1.0, animations: { () -> Void in | |
| self.arrowImageView.transform = CGAffineTransformMakeRotation(CGFloat(180 * M_PI)) | |
| }) { (succeed) -> Void in | |
| } |
This file contains hidden or 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 annotationView() -> MKAnnotationView { | |
| let annonView = MKAnnotationView(annotation: self, reuseIdentifier: "annotation") | |
| annonView.enabled = true | |
| annonView.canShowCallout = true | |
| let image = UIImage(named: "incident") | |
| let imageView = UIImageView(frame: CGRectMake(0, 0, image!.size.width, image!.size.height)) | |
| imageView.image = image?.imageWithRenderingMode(.AlwaysTemplate) | |
| let level = Model.getLevelWithId(incident.levelId) | |
| var color = (level?.color != nil) ? level?.color : UIColor.redColor() |
This file contains hidden or 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
| if let data: AnyObject = data where JSON(data)["cost_id"].intValue > 0 { | |
| completion(succeed: true, costId: JSON(data)["cost_id"].intValue) | |
| return | |
| } |
This file contains hidden or 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
| var customObject: CustomObject? { | |
| if self.customObject == nil { | |
| self.customObject = CustomObject() | |
| } | |
| return self.customObject | |
| } |
This file contains hidden or 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
| var childVC: UIViewController? | |
| @IBOutlet weak var containerView: UIView! | |
| func ChangeViewController() { | |
| childVC?.willMoveToParentViewController(nil) | |
| childVC?.view.removeFromSuperview() | |
| childVC?.removeFromParentViewController() | |
| childVC = storyboard?.instantiateViewControllerWithIdentifier("identifier") as? UIViewController | |
| if let childVC = childVC { | |
| addChildViewController(childVC) |