I have an array of views with subviews inside. Once the last subview is displayed I want to run a different statement from an if else statement. So like this:
let subviews: Array = self.view.subviews
if subviews.endIndex {
return 4
}else{
return 0
}
Although I know this code is incorrect but I am trying to get the last last element in the subviews array.