Extracting some information

Joined
Sep 28, 2018
Messages
2
Reaction score
0
Points
1
Lets suppose this array:
Code:
static let dlkContent = [  
        LabelContent(text: "PRE FLT", theme: .menuOption),  
        LabelContent(text: "IN FLT", theme: .menuOption),  
        LabelContent(text: "POST FLT", theme: .menuOption),  
        LabelContent(text: "FREE TEXT", theme: .menuOption),  
        LabelContent(text: "FLT TIMES", theme: .menuOption),  
        LabelContent(text: "SYS MENU", theme: .menuOption),  
        LabelContent(text: "NEW MSGS", theme: .menuOption),  
        LabelContent(text: "MSGS SENT", theme: .menuOption),  
        LabelContent(text: "MSGS RCVD", theme: .menuOption),  
        LabelContent(text: "VOX CONTACT", theme: .menuOption),  
        LabelContent(text: "STATUS", theme: .menuOption),  
        LabelContent(text: "ATS MENU", theme: .menuOption),  
        ]

Is it possible to insert a new "element" like (destination: "navContent")?
Code:
LabelContent(text: "PRE FLT", theme: .menuOption, destination: "navContent"),

And use this information to inform for an IBAction what array to be used?
Code:
@IBAction func btn1L(_ sender: UIButton) {  
        Contents.apply(contents: Contents.destination[0][0..<12], to: uiTextLabels)  
          
    }

Basically, I would like to inform the system that every time the dlkContent Array is used, if the user select the button, corresponding to the first element of this array, it will call another action with that mentioned value

I know the line 02 of the last code is not ok. But I would like to get the first destination value of the array and use in Contents.xxxx

Is it possible?

Thank you
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top