public class SelectedValue {
static let sharedInstance = SelectedValue()
public var reportPostId : Int? = nil
public var report_GroupId : Int? = nil
public var postType : String? = nil
}
'init' is inaccessible due to 'internal' protection level Please help me to solve this. Thanks
As it says, the
initmethod (that you probably called without it's name) isprivate. make it morepublicto access it.Click on the gray lines that say 'init' declared here to jump to the source of the issue.
Note that
MyClass()is equal toMyClass.init(). that means you are calling theinitmethod each time you build an object.And also note that if you don't specify the access level, it will be
internalby default.So this:
is equal to:
So you should change it to: