This file contains 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 someDate = NSDate() | |
let tomorrow = NSCalendar.currentCalendar().dateByAddingUnit(NSCalendarUnit.CalendarUnitDay, value: 18, toDate: someDate, options: nil) |
This file contains 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
// | |
// ViewController.swift | |
// AllredTube | |
// | |
// Created by Nick Walter on 6/29/15. | |
// Copyright (c) 2015 Nick Walter. All rights reserved. | |
// | |
import UIKit |
This file contains 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
Happy new year! Hope you all had a great holiday. For January's meeting were are going to have an open discussion. This is something we are trying out that our SLC Cocoaheads friends do occasionally. Feel free to bring something you want to present like an app your working on or a new framework that you like. We'd also like to have some discussion on topics you're interested in. These could be anything from AppCode vs. Xcode, when to use singletons, etc. We will be meeting in room ## of the Tanner Building on BYU campus. Here is link to the facebook event. | |
Hope to see you all there and please respond back with any questions! |
This file contains 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
NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; | |
[formatter setDateFormat:@"yyyy-MM-dd"]; | |
NSString *stringFromDate = [formatter stringFromDate:thumbnailBodyPic.date]; |
This file contains 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
+ (id)sharedInstance { | |
static API *sharedMyManager = nil; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
sharedMyManager = [[self alloc] init]; | |
}); | |
return sharedMyManager; | |
} |
This file contains 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
// | |
// ViewController.m | |
// fixtestingthing | |
// | |
// Created by Nick Walter on 10/31/13. | |
// Copyright (c) 2013 Nikki. All rights reserved. | |
// | |
#import "ViewController.h" |
This file contains 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
- (IBAction)sendTapped { | |
ToDo *toDo = [[ToDo alloc] init]; | |
toDo.task = self.taskTextField.text; | |
toDo.taskDescription = self.descriptionTextView.text; | |
// Not sure how in the data model we want to handle this but you can get sender email below | |
// self.toComposeView.toTextField.text | |
} |
This file contains 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
// Calculate the size of the tableView if it were to be dispalyed | |
[self.tableView layoutIfNeeded]; | |
// If the conent of the tableView is too small to scroll past the search bar... | |
if (self.tableView.contentSize.height < self.tableView.frame.size.height) { | |
// Add the difference and the height of the serachBarView to the bottom of the contentSize | |
CGFloat diff = self.tableView.frame.size.height - self.tableView.contentSize.height; | |
self.tableView.contentInset = UIEdgeInsetsMake(0, 0, (diff + 44), 0); | |
} | |
// Scroll to the first section and the first row of the tableView | |
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:NO]; |