Make sure your class inherits from NSObject
class MyAccounts:NSObject {
/* ... */
class MyCalendar {
var title:String?
var identifier:String?
var email:String?
var calType:String?
var isActive:Bool?
var isMainAcount:Bool?
init(){}
}
}
Related Contents:
- What is the purpose of willSet and didSet in Swift?
- “The file “MyApp.app” couldn’t be opened because you don’t have permission to view it” when running app in Xcode 6 Beta 4
- Does Swift have documentation generation support?
- How to round a Double to the nearest Int in swift?
- What’s the cleanest way of applying map() to a dictionary in Swift?
- Swift: guard let vs if let
- Swift do-try-catch syntax
- Instance member cannot be used on type
- dealloc in Swift
- Swift equivalent of [NSBundle bundleForClass:[self class]]
- What is the difference between convenience init vs init in swift, explicit examples better
- Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]
- Get current date in Swift 3? [closed]
- Custom font size for Text in SwiftUI
- Property cannot be declared public because its type uses an internal type
- How to remove the left and right Padding of a List in SwiftUI?
- Best practice to implement a failable initializer in Swift
- Exponentiation operator in Swift
- Using Decodable in Swift 4 with Inheritance
- How to benchmark Swift code execution?
- Swift inline conditional?
- How do I get a reference to the AppDelegate in Swift?
- Calling protocol default implementation from regular method
- Module compiled with swift 3.0 cannot be imported in Swift 3.0.1
- Swift – what’s the difference between metatype .Type and .self?
- Sharing UserDefaults between extensions
- Check if Swift text field contains non-whitespace
- Show AM/PM in capitals in swift
- When are argument labels required in Swift?
- Open UIDatePicker programmatically in iOS 14
- How to convert a date string with optional fractional seconds using Codable in Swift?
- UIWindow endDisablingInterfaceAutorotationAnimated error appears in console when keyboard is dismissed interactively from collectionView in iOS9 only
- How do I declare a class level function in Swift?
- Swift: What does backslash dot “\.” mean?
- How to bring NSWindow to front and to the current Space?
- What does the SwiftUI `@State` keyword do?
- Convert Swift Dictionary to String
- Why is ‘throws’ not type safe in Swift?
- Debug breakpoint in Swift Playground?
- How can I hide the navigation back button in SwiftUI?
- indirect enums and structs
- SwiftUI preview provider with binding variables
- How to detect vertical planes in ARKit?
- Generic Swift 4 enum with Void associated type
- How to remove “row” separators/dividers from a List in SwiftUI?
- Using an NSTimer in Swift
- ‘An NSManagedObject of class ‘className’ must have a valid NSEntityDescription.’ error
- How to use openURL for making a phone call in Swift?
- Casting from ‘NSPersistentStoreResult’ to unrelated type ‘Entity’ always fails
- When should I use deinit?