我正在尝试建立一个简单的车辆管理应用程序,作为我大学任务的一部分。如果我的查询过于基本,因为我不熟悉编程,我会提前道歉。 所以,问题是
非常感谢您的帮助。请考虑我想要为其创建实例的子类的屏幕截图。
谢谢和问候 Final Sub Class which is to be dynamically instantiated
class SelectVehicleViewController: UIViewController, UITableViewDelegate
{
var vehName = String()
var vehVIN = String()
var engineType = String()
var engineCapacity = String()
var manufacturingYear = String()
var odometerDistance = Int()
var engineOil = Int()
var transmissionOil = Int()
var powerSteeringOil = Int()
var brakeOil = Int()
var coolant = Int()
var engineAirFilter = Int()
var engineOilFilter = Int()
var fuelFilter = Int()
var fuelInjectors = Int()
var cabinAirFilter = Int()
var timingBelt = Int()
var accessoryBelt = Int()
var setupLastRefuelling = Int()
init(vehName: String, vehVIN: String, engineType: String, engineCapacity: String, manufacturingYear: String, odometerDistance: Int,
engineOil: Int, transmissionOil: Int, powerSteeringOil: Int, brakeOil: Int, coolant: Int, engineAirFilter: Int, engineOilFilter: Int,
fuelFilter: Int, fuelInjectors: Int, cabinAirFilter: Int, timingBelt: Int, accessoryBelt: Int,‹ setupLastRefuelling: Int)
{
}
required init?(coder aDecoder: NSCoder)
{
fatalError("init(coder:) has not been implemented")
}
// Create an object of the data received from Summary Scene in SelectVehicle Scene
//var vehicleArray: [SelectVehicleViewController] = []
override func viewDidLoad()
{
super.viewDidLoad()
}
//Setting up the table view in Vehicle Selector Scene
// func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int
{ return vehicleArray.count}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
{
let cell = UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: "cell")
//cell.textLabel?.text = vehicleArray[indexPath.row]
return cell
}
override func didReceiveMemoryWarning()
{
super.didReceiveMemoryWarning()
}
}