-
Notifications
You must be signed in to change notification settings - Fork 0
/
BackTableVC.swift
84 lines (58 loc) · 2.35 KB
/
BackTableVC.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
//
// BackTableVC.swift
// globalstockmarket
//
// Created by Samarth Kejriwal on 20/06/17.
// Copyright © 2017 Samarth Kejriwal. All rights reserved.
//
import UIKit
class slidemenucell : UITableViewCell{
@IBOutlet weak var slidelabel: UILabel!
@IBOutlet weak var images: UIImageView!
}
class BackTableVC: UIViewController,UITableViewDelegate,UITableViewDataSource {
var TableArray = [String]()
@IBOutlet weak var tableview: UITableView!
@IBOutlet weak var stockmarketimage: UIImageView!
override func viewDidLoad() {
TableArray = ["Share" , "Feedback" , "Rate Us"]
stockmarketimage.image = UIImage(named : "global_stock_market")
tableview.delegate = self
tableview.dataSource = self
tableview.tableFooterView = UIView()
self.revealViewController().rearViewRevealWidth = self.view.frame.width - 100
super.viewDidLoad()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return TableArray.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableview.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! slidemenucell
cell.slidelabel?.text = TableArray[indexPath.row]
if TableArray[indexPath.row] == "Share"
{
cell.images?.image = UIImage(named : "shareit")
}
else if TableArray[indexPath.row] == "Feedback"
{
cell.images?.image = UIImage(named : "feedback")
}
else if TableArray[indexPath.row] == "Rate Us"
{
cell.images?.image = UIImage(named : "rateus")
}
return cell
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/
}