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
| let query = PFUser.query() | |
| //query.includeKey("photo") | |
| query.getObjectInBackgroundWithId("ZEdXH1G0zj", block: { (object, error) -> Void in | |
| if let user = object as? PFUser { | |
| println(user.objectForKey("username")) | |
| let file: PFFile = user.objectForKey("photo") as PFFile | |
| if file.isDataAvailable == true { | |
| println("YES") | |
| } else { | |
| println("NO") |
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
| class User: NSManagedObject { | |
| @NSManaged var username: String | |
| var firstLetter: String { | |
| get { | |
| let letter = String(username[advance(username.startIndex, 0)]) | |
| return letter | |
| } | |
| } | |
| } |
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
| I want to order by username, and section firstLetter (a,b,c,d...) | |
| I made firstLetter optional and sectionIdentifier transitient & optional | |
| class User: NSManagedObject { | |
| @NSManaged var username: String | |
| @NSManaged var firstLetter: String | |
| var sectionIdentifier: String { | |
| get { | |
| firstLetter = String(username[advance(username.startIndex, 0)]) |
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 expensiveVenuePredicate: NSPredicate = { | |
| var predicate = NSPredicate(format: "priceInfo.priceCategory == %@", "$$$") | |
| return predicate! | |
| }() | |
| vs | |
| var expensiveVenuePredicate: NSPredicate = NSPredicate(format: "priceInfo.priceCategory == %@", "$$$") |
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
| let friend = parseFriendArray[indexPath.row] as ParseFriend | |
| println(friend) | |
| println(friend.status) | |
| OUTPUT | |
| <Friend: 0x7feb78c3f380, objectId: 4lg4EqftgH, localId: (null)> { | |
| fromUser = "<PFUser: 0x7feb78c542c0, objectId: k380X271Ap>"; | |
| status = 0; | |
| toUser = "<PFUser: 0x7feb78c55790, objectId: CmAFklTdhj>"; | |
| } |
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 (product.descripcion) { | |
| cell.descripcion.text = [product.descripcion substringToIndex:30]; | |
| } |
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
| //Creating the UIView for the inputAccesoryView | |
| class KeyBoardNext: UIView { | |
| func inputAccessoryView() -> UIView { | |
| let button = UIButton() | |
| button .setTitle("Next", forState: UIControlState.Normal) | |
| button.backgroundColor = UIColor.greenColor() | |
| return button | |
| } | |
| } |
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
| // | |
| #import "SongsViewController.h" | |
| #import "AppDelegate.h" | |
| #import "TrackTableViewCell.h" | |
| #import "Track.h" | |
| #import "Tag.h" | |
| #import "SongViewController.h" | |
| #import "variables.h" |
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
| - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath | |
| { | |
| NSLog(@"im here"); | |
| return 95; | |
| } |
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
| ~/Desktop$ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -rem gAMA -rem cHRM -rem iCCP -rem sRGB splash.png splashNEW.png | |
| | pngcrush 1.6.4 | |
| | Copyright (C) 1998-2002,2006 Glenn Randers-Pehrson | |
| | Copyright (C) 2005 Greg Roelofs | |
| | This is a free, open-source program. Permission is irrevocably | |
| | granted to everyone to use this version of pngcrush without | |
| | payment of any fee. | |
| | Executable name is pngcrush | |
| | It was built with libpng version 1.2.7, and is |