Skip to content

Instantly share code, notes, and snippets.

View vburojevic's full-sized avatar

Vedran Burojević vburojevic

  • Caffeinated Code
  • Zagreb, Croatia
View GitHub Profile
@vburojevic
vburojevic / swift
Created April 26, 2016 20:45
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 {
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
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()