Skip to content

Instantly share code, notes, and snippets.

Avatar

Vedran Burojević vburojevic

  • Caffeinated Code
  • Zagreb, Croatia
View GitHub Profile
@vburojevic
vburojevic / swift
Created April 26, 2016 20:45
Swift
View swift
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
guard let items = items else {
return 0
}
return items.count
}
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
guard let item = items?[indexPath.row] else {
View gist:f065cd6d5b2d95ac15b9f29b080508fe
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
guard let items = items else {
return 0
}
return items.count
}
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
guard let item = items?[indexPath.row] else {
@vburojevic
vburojevic / RxAlamofire+Debug
Created February 13, 2016 13:50
RxAlamofire logging
View RxAlamofire+Debug
import Alamofire
import RxAlamofire
extension Alamofire.Request {
public func logRequest() -> Self {
print(terminator:"\n")
print("🚀 REQUEST: \(self.request!.URL!)", terminator:"\n")
debugPrint(self, terminator:"\n\n")
_ = rx_responseJSON()