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 | |
class FYISession { | |
let savedUserKey = "savedUser" | |
static let sharedInstance = FYISession() | |
var user:FYIUser = FYIUser(userId: 0, userMobile: "", userEmail: "", userName: "") | |
func userLoggedIn() -> Bool{ |
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 UIKit | |
import GoogleMaps | |
class GMInteractiveMarker: UIViewController,GMSMapViewDelegate { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view, typically from a nib. | |
self.loadMap() |
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/Foundation.h> | |
@interface NSString (DateFormatter) | |
- (NSString *)dateStringFromFormat:(NSString *)fromFormat toFormat:(NSString *)toFormat; | |
@end |
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
//A function that could be called recursively to calculate the total of an integer array. | |
func total(array:NSArray,index:Int,sum:Int) -> Int { | |
if (index > (array.count - 1)) { | |
return sum | |
}else { | |
let currentNumber:Int = array.objectAtIndex(index) as! Int | |
let currentTotal:Int = sum + currentNumber | |
return total(array, index: index + 1, sum: currentTotal) | |
} |
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
cd "${XCS_SOURCE_DIR}/<project directory name>" | |
git log -1 --pretty=%B > "releaseNote.txt" | |
"Pods/Crashlytics/submit" <key> <secret> \ | |
-notesPath "releaseNote.txt" \ | |
-ipaPath "${XCS_PRODUCT}" -groupAliases <your distribution group> \ | |
-notifications YES |
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
//Prior to running the script below change build settings as mentioned in https://developer.apple.com/library/ios/qa/qa1827/_index.html | |
cd "${XCS_SOURCE_DIR}/Writer" | |
xcrun agvtool new-version -all "${XCS_INTEGRATION_NUMBER}" |
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 UIKit | |
@objc class MyAPI: NSObject { | |
static let keyError: String = "Error" | |
static let keyResult: String = "Result" | |
static let unknownError: String = "Unknown error" | |
static let notificationMyAPIDidEnd = Notification.Name(rawValue: "notificationMyAPIDidEnd") |
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
+ (NSString *) encodeString: (NSString *) string { | |
NSMutableString *output = [NSMutableString string]; | |
const unsigned char *source = (const unsigned char *)[string UTF8String]; | |
int sourceLen = (int)strlen((const char *)source); | |
for (int i = 0; i < sourceLen; ++i) { | |
const unsigned char thisChar = source[i]; | |
if (thisChar == ' '){ | |
[output appendString:@"%20"]; | |
} else if (thisChar == '.' || thisChar == '-' || thisChar == '_' || thisChar == '~' || |
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
enum FontName: String { | |
case timesNewRoman = "TimesNewRomanPSMT" | |
case timesNewRomanItalic = "TimesNewRomanPS-ItalicMT" | |
case timesNewRomanBold = "TimesNewRomanPS-BoldMT" | |
} | |
extension UIFont { | |
class var sanFranciscoRegular: UIFont { | |
if let font = UIFont.init(name: "SFUIText-Regular", size: 15) { |
OlderNewer