Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Foundation
- import UIKit
- import Parse
- class ATM {
- var id : NSString!
- var bank : NSString!
- var type : NSNumber!
- var location : PFGeoPoint!
- var description : NSString!
- init( id: NSString)
- {
- let query = PFQuery(className: "ATMs")
- query.getObjectInBackgroundWithId(id as String) { (object: PFObject?, error: NSError?) -> Void in
- if error != nil {
- print(error)
- }
- else {
- if let atm = object {
- print("ATM found")
- self.bank = atm["bank"] as? NSString
- self.type = atm["type"] as? NSNumber
- self.location = atm["location"] as? PFGeoPoint
- self.description = atm["description"] as? NSString
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement