I created an array called events in Objective-C, and I want to be able to add events to the array in Swift. Here is my declaration of the property in Objective-C:
@property (nonatomic, strong) NSMutableArray *events;
Here is my usage of the array in the Swift file.
var objectC = DPCalendarTestStoryboardViewController()
@IBAction func addMedicine(sender: AnyObject) {
objectC.events = [].mutableCopy
var event: DPCalendarEvent = DPCalendarEvent(title: nameText.text, startTime: startDatePicker.date, endTime: startDatePicker.date, colorIndex: 2)
objectC.events.append(event)
}
Here is the error message:
Value of type 'DPCalendarTestStoryboardViewController' has no member 'events'