Skip to content

Instantly share code, notes, and snippets.

View PayPal sample
@IBAction func buyClothingAction(sender: AnyObject) {
// Remove our last completed payment, just for demo purposes.
resultText = ""
// Note: For purposes of illustration, this example shows a payment that includes
// both payment details (subtotal, shipping, tax) and multiple items.
// You would only specify these if appropriate to your situation.
// Otherwise, you can leave payment.items and/or payment.paymentDetails nil,
// and simply set payment.amount to your total charge.
@jayrparro
jayrparro / CLPlaceMark
Created Aug 9, 2016
CLPlaceMark properties
View CLPlaceMark
Accessing the Placemark Attributes
name - The name of the placemark. (read-only)
addressDictionary - A dictionary containing the Address Book keys and values for the placemark. (read-only)
ISOcountryCode - The abbreviated country name. (read-only)
country - The name of the country associated with the placemark. (read-only)
postalCode - The postal code associated with the placemark. (read-only)
administrativeArea - The state or province associated with the placemark. (read-only)
subAdministrativeArea - Additional administrative area information for the placemark. (read-only)
locality - The city associated with the placemark. (read-only)
subLocality - Additional city-level information for the placemark. (read-only)
View instantiateInitialViewController
let storyboard = UIStoryboard(name: "DetailView", bundle: NSBundle.mainBundle())
let viewController = storyboard.instantiateInitialViewController()
if let viewController = viewController {
self.presentViewController(viewController, animated: true, completion: nil)
}
@jayrparro
jayrparro / .gitignore_global
Created Jun 11, 2015
Global gitignore configuration
View .gitignore_global
#compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #