@@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="proposalCell" rowHeight="125" id="BuM-GX-rsE" customClass="CustomCell" customModule="Mobilize" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="125"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="BuM-GX-rsE" id="96L-VH-gmo">
<rect key="frame" x="0.0" y="0.0" width="375" height="124.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="v7w-fY-g5t">
<rect key="frame" x="3" y="6" width="369" height="113"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="WfZ-av-Gah">
<rect key="frame" x="111" y="89" width="20" height="20"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="no" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ES0-j2-4yD">
<rect key="frame" x="81" y="91" width="28" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="6"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="aXw-eH-WnY">
<rect key="frame" x="59" y="89" width="20" height="20"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Up" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GHf-Bj-cpH">
<rect key="frame" x="29" y="92" width="28" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="6"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="F0X-0c-C3k">
<rect key="frame" x="8" y="89" width="20" height="20"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Proposta" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="29e-l1-cLG">
<rect key="frame" x="7" y="63" width="354" height="23"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="proposto por" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8Fy-ir-waX">
<rect key="frame" x="65" y="4" width="155" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Politico" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="orq-XH-X5z">
<rect key="frame" x="65" y="32" width="296" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="r2g-KG-93g">
<rect key="frame" x="7" y="4" width="54" height="54"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Co" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5GD-4H-Aty">
<rect key="frame" x="134" y="92" width="28" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="6"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Fvt-Ja-FPv">
<rect key="frame" x="336" y="-2" width="30" height="30"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="wNQ-21-Xg1">
<rect key="frame" x="274" y="-2" width="30" height="30"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="iO4-pf-rTQ">
<rect key="frame" x="305" y="-2" width="30" height="30"/>
</imageView>
</subviews>
</tableViewCellContentView>
<color key="backgroundColor" red="0.61136758207070707" green="0.61136758207070707" blue="0.61136758207070707" alpha="1" colorSpace="calibratedRGB"/>
<connections>
<outlet property="againstVote" destination="aXw-eH-WnY" id="wr9-EH-h1F"/>
<outlet property="againstVoteCount" destination="ES0-j2-4yD" id="d3g-r2-B30"/>
<outlet property="category1" destination="Fvt-Ja-FPv" id="7G2-pr-xMi"/>
<outlet property="category2" destination="iO4-pf-rTQ" id="sjn-Sh-nja"/>
<outlet property="category3" destination="wNQ-21-Xg1" id="oQr-Lt-nzW"/>
<outlet property="cellView" destination="v7w-fY-g5t" id="Rtg-QQ-uqK"/>
<outlet property="comment" destination="WfZ-av-Gah" id="Oi8-Dy-CON"/>
<outlet property="commentCount" destination="5GD-4H-Aty" id="oHE-lK-LU2"/>
<outlet property="nameUser" destination="orq-XH-X5z" id="0LC-cQ-dSS"/>
<outlet property="proposalBy" destination="8Fy-ir-waX" id="NWH-qO-MxP"/>
<outlet property="textProposal" destination="29e-l1-cLG" id="bs4-Cj-n6U"/>
<outlet property="upVote" destination="F0X-0c-C3k" id="5k4-l5-9tN"/>
<outlet property="upVoteCount" destination="GHf-Bj-cpH" id="Vxz-wI-la5"/>
<outlet property="userPicture" destination="r2g-KG-93g" id="2xH-OC-fgs"/>
</connections>
<point key="canvasLocation" x="844.5" y="497.5"/>
</tableViewCell>
</objects>
</document>
@@ -0,0 +1,86 @@
//
// ThemesCategory.swift
// Mobilize
//
// Created by Franclin Cabral on 10/11/15.
// Copyright © 2015 Miguel Araújo. All rights reserved.
//
import UIKit

class ThemesCategory: UITableViewController {

var categories = [String]()

override func viewDidLoad() {
super.viewDidLoad()
self.tableView.registerNib(UINib(nibName: "CategoryCell", bundle: nil), forCellReuseIdentifier: "categoryCell")



// Do any additional setup after loading the view.
categories = ["Todos", "Saúde", "Trânsito", "Educação", "Segurança", "Cultura"]

}

override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}


override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
return 1
}

override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return categories.count
}

override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("categoryCell", forIndexPath: indexPath) as! CategoryCellTableViewCell

if categories[indexPath.row] == "Saúde"{ //Saúde
cell.categoryImage.image = UIImage(named: "saude2")
}else if categories[indexPath.row] == "Trânsito" { //Transito
cell.categoryImage.image = UIImage(named: "mobilidade2")
}else if categories[indexPath.row] == "Educação" { //Educação
cell.categoryImage.image = UIImage(named: "educacao2")
}else if categories[indexPath.row] == "Segurança" { //Segurança
cell.categoryImage.image = UIImage(named: "seguranca2")
}else if categories[indexPath.row] == "Cultura" { //Cultura
cell.categoryImage.image = UIImage(named: "cultura2")
}else{
cell.categoryImage.image = UIImage(named: "temas")
}

cell.categoryName.text = categories[indexPath.row]

return cell
}


override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
print("Franclin")

}


override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
let destVc = segue.destinationViewController as! Propostas

let indexPath : NSIndexPath = self.tableView.indexPathForSelectedRow!

//here i need the value of the parameter for the search
destVc.category = categories[indexPath.row] //Get the value
}


// override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
//
//
// self.tableView.deselectRowAtIndexPath(indexPath, animated: true)
// }
}