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
| expr -- (void)printf("[%s, %s]\n",(char *) object_getClassName(*(long*)($esp+4)), (char *) *(long *)($esp+8) ) |
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
| // Key sections of code for this implementation are placed below | |
| @interface JSTableWithFixedHeaderViewController () | |
| @property (strong, nonatomic) UIView *fixedHeaderView; | |
| @end | |
| @implementation JSTableWithFixedHeaderViewController |
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 timeAgoSinceDate(date:NSDate, numericDates:Bool) -> String { | |
| let calendar = NSCalendar.currentCalendar() | |
| let now = NSDate() | |
| let earliest = now.earlierDate(date) | |
| let latest = (earliest == now) ? date : now | |
| let components:NSDateComponents = calendar.components([NSCalendarUnit.Minute , NSCalendarUnit.Hour , NSCalendarUnit.Day , NSCalendarUnit.WeekOfYear , NSCalendarUnit.Month , NSCalendarUnit.Year , NSCalendarUnit.Second], fromDate: earliest, toDate: latest, options: NSCalendarOptions()) | |
| if (components.year >= 2) { | |
| return "\(components.year) years ago" | |
| } else if (components.year >= 1){ |