Error: 'Type of expression is ambiguous without more context'

if let pfObjects = objects as? [PFObject]
{
    for pfObject in pfObjects
    {
        self.timelineData.addObject(pfObject)
    }
}

...exclamation points in Swift code give me the heeby jeebies.


You can help the compiler know what objects is like this:

for object in objects as! [PFObject] {
    self.timelineData.addObject(object)
}

If you are writing some code likes:

for (i, view) in views { 
}

You need to add enumerated:

for (i, view) in views.enumerated() {
}

And now it should work.