ios - How to return Collection of Self type? -


how return objects of type self subclass of object calling function returns subclass type instead of object type?

this doesn't work, if replace self object, works don't result i'm looking for.

public extension object {      class func objects() -> results<self> {         return try! realm().objects(self)     }  } 


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -