Skip to content

Instantly share code, notes, and snippets.

View kmuralidharan91's full-sized avatar
๐Ÿ˜€

Muralidharan Kathiresan kmuralidharan91

๐Ÿ˜€
View GitHub Profile
switch(expression){
case constant-expression :
statement(s);
break; /* optional */
case constant-expression :
statement(s);
break; /* optional */
/* you can have any number of case statements */
default : /* Optional */
@kmuralidharan91
kmuralidharan91 / GenerateResources.sh
Created December 14, 2018 07:56
Generate Resources Build Script for SwiftGen
#!/bin/sh
RSROOT=$SRCROOT/CleanAssetsManagementDemo/Resources
"$PODS_ROOT/SwiftGen/bin/swiftgen" \
xcassets -t swift3 "$RSROOT/Assets.xcassets" \
--output "$RSROOT/Assets.swift"
"$PODS_ROOT/SwiftGen/bin/swiftgen" \
@kmuralidharan91
kmuralidharan91 / SearchResultsTableViewController.swift
Created July 25, 2018 06:11
UITableViewController with SearchBar
import UIKit
import SwiftyJSON
import Alamofire
import SafariServices
final class SearchResultsTableViewController: UITableViewController {
private var searchResults = [JSON]() {
didSet {
tableView.reloadData()
@kmuralidharan91
kmuralidharan91 / APIRequestFetcher.swift
Created July 25, 2018 06:00
APIRequestFetcher.swift
import Foundation
import SwiftyJSON
import Alamofire
enum NetworkError: Error {
case failure
case success
}
class APIRequestFetcher {
@kmuralidharan91
kmuralidharan91 / CustomTableViewCell.swift
Last active July 24, 2018 18:45
WikiSearch - Demo app on Alamofire with SwiftyJSON
import UIKit
class CustomTableViewCell: UITableViewCell {
@IBOutlet weak var wikiImageView: UIImageView!
@IBOutlet weak var titleLabel: UILabel!
@IBOutlet weak var descriptionLabel: UILabel!