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
// UIFont+Utility.h | |
// UIFont+Utility.[h|m] is (C) Kerri Shotts 2013, and released under an MIT license. | |
#import <UIKit/UIKit.h> | |
/** | |
* | |
* PKFontNormal = no modifications to the font; i.e., -Regular, -Roman, -Book, etc. | |
* PKFontBold = bold font desired (if possible); i.e., -Bold, -Black, -Heavy, etc. | |
* PKFontItalic = italic font desired (if possible); i.e., -Italic, -Oblique, etc. |
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
// | |
// APIStatusCode.h | |
// Bishal Ghimire | |
// | |
// Created by Leapfrog on 9/1/14. | |
// Copyright (c) 2014 Bishal Ghimire. All rights reserved. | |
// | |
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Response_codes | |
// http://www.w3.org/Protocols/HTTP/HTRESP.html | |
// http://www.raywenderlich.com/51127/nsurlsession-tutorial |
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
- (UIColor *)randomColor { | |
CGFloat white = ( arc4random() % 90 / 256.0 ) + 0.3; // 0.35 - 0.65 | |
UIColor *color = [UIColor colorWithWhite:white alpha:1.0]; | |
return color; | |
} |
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
// | |
// apiStatusCodes.swift | |
// Bishal Ghimire | |
// | |
// Copyright (c) 2014 Bishal Ghimire. All rights reserved. | |
// | |
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Response_codes | |
// http://www.w3.org/Protocols/HTTP/HTRESP.html | |
// http://www.raywenderlich.com/51127/nsurlsession-tutorial |
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
import Foundation | |
#if DEBUG | |
func dLog(@autoclosure message: () -> String, filename: NSString = __FILE__, function: String = __FUNCTION__, line: Int = __LINE__) { | |
NSLog("[\(filename.lastPathComponent):\(line)] \(function) - %@", message()) | |
} | |
#else | |
func dLog(@autoclosure message: () -> String, filename: NSString = __FILE__, function: String = __FUNCTION__, line: Int = __LINE__) { | |
} | |
#endif |
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
func heightForIndexPath(indexPath: NSIndexPath, inWidth width: CGFloat, andHeight height: CGFloat) -> CGFloat { | |
if indexPath.item % 2 != 0 { | |
return cellHeight | |
} | |
let labelLeft = UILabel(frame: CGRect(x: 0, y:0, width: width, height: height)) | |
labelLeft.font = UIFont.fontForTextStyle(UIFontTextStyleHeadline, scaleFactor: Fonts.FontScale.Small.value) | |
labelLeft.numberOfLines = 0 | |
let video = videosInCollection[indexPath.row] | |
labelLeft.text = video.description |
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
// | |
// HomeVC.swift | |
// LoginKit | |
// | |
// Created by Bishal Ghimire on 2/24/16. | |
// Copyright © 2016 Bishal Ghimire. All rights reserved. | |
// | |
import UIKit | |
import ResearchKit |
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
// | |
// AppInfo.swift | |
// This is an Util to get app infos like build / version number etc | |
// Swift 3.0 | |
// Xcode 8.0 | |
// | |
import Foundation | |
import AVFoundation |
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
// | |
// CoreDataStack.swift | |
// Swift 3.0 | |
// Xcode 8.0 | |
// | |
import Foundation | |
import CoreData | |
class CoreDataStack: NSObject { |
OlderNewer