Home Relative path with dot notation for accessing property in swift iOS
Reply: 0

Relative path with dot notation for accessing property in swift iOS

Sam
1#
Sam Published in 2018-01-12 15:34:22Z

I have a String columnName and I would like to use it as part of the path in stringInModel:

let columnName = nodeArray[nodeArrayNo].columnName
stringInModel = row[rowNoOfText].columnName!

row contains elements of a custom type and this custom type has for example a property called id. If I access it like this it works: row[rowNoOfText].id!

I am receiving the following error: Value of type 'KennzahlenModel' has no member 'columnName'

I just need columnName to become the String and fulfill the path.

Thank you!

UPDATE: The properties I am trying to access from KennzahlenModel are

import Foundation
class KennzahlenModel: NSObject {
//properties

var id: String?
var spielrundeId: String?
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.397806 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO