Yes, but in ObjC you don't have to write them manually and I don't want to have to do so in Swift either.
Here is what I mean:
Test.h
@interface Test : NSObject
@property (nonatomic, readonly) BOOL someTest;
@end
Test.m
@interface Test ()
@property (nonatomic, assign) BOOL someTest;
@end
This is a common way of doing it in Objective-C.
It allows you to publicly declare something as readonly - but the compiler creates a private setter within the class for me.
So in the above situation, I now add a Swift extension so I can slowly move my code over to Swift.
Test.swift
extension Test {
func something() {
//no way to assign a value to someTest
}
}
If its not possible, its not possible. Fine, but I want to ask.