-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release MapplsAPICore(1.0.11), MapplsAPIKit(2.0.22), MapplsMap(5.13.1…
…1), MapplsUIWidgets(1.0.6) - Capability to show Building Boundry of selected point on the map is added. - Apple Privacy Manifest file added.
- Loading branch information
Robin Macbook Pro
committed
May 9, 2024
1 parent
c0aa967
commit 2cde7c3
Showing
45 changed files
with
10,464 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import Foundation | ||
|
||
import UIKit | ||
import MapplsMap | ||
import MapplsAPIKit | ||
import MapplsAPICore | ||
class PlacemarkDetailsVC: UIViewController { | ||
lazy var tableView = UITableView(frame: .zero) | ||
|
||
var tableDict : [[String : Any]] = [[String : Any]]() | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
setupViews() | ||
self.view.backgroundColor = .white | ||
self.tableView.reloadData() | ||
} | ||
|
||
private func setupViews() { | ||
self.view.addSubview(self.tableView) | ||
tableView.backgroundColor = .white | ||
tableView.translatesAutoresizingMaskIntoConstraints = false | ||
tableView.leadingAnchor.constraint(equalTo: self.view.leadingAnchor).isActive = true | ||
tableView.trailingAnchor.constraint(equalTo: self.view.trailingAnchor).isActive = true | ||
tableView.topAnchor.constraint(equalTo: self.view.topAnchor, constant: 0).isActive = true | ||
tableView.bottomAnchor.constraint(equalTo: self.view.bottomAnchor, constant: 0).isActive = true | ||
tableView.delegate = self | ||
tableView.dataSource = self | ||
tableView.register(DemoMapStyleTableViewCell.self, forCellReuseIdentifier: "cell") | ||
} | ||
} | ||
|
||
extension PlacemarkDetailsVC : UITableViewDataSource, UITableViewDelegate { | ||
func numberOfSections(in tableView: UITableView) -> Int { | ||
return 1 | ||
} | ||
|
||
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
return tableDict.count | ||
} | ||
|
||
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
let cellIdentifier = "Cell" | ||
var tableCell: UITableViewCell! | ||
if let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier){ | ||
tableCell = cell | ||
}else { | ||
tableCell = UITableViewCell(style: .value1, reuseIdentifier: cellIdentifier) | ||
} | ||
if tableDict.indices.contains(indexPath.row), let key = tableDict[indexPath.row].keys.first , let value = tableDict[indexPath.row].values.first{ | ||
tableCell.textLabel?.text = "\(key)" | ||
tableCell.detailTextLabel?.text = "\(value)" | ||
} | ||
return tableCell | ||
} | ||
|
||
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | ||
return 50 | ||
} | ||
} |
Oops, something went wrong.