You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 2, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 2, 2020. It is now read-only.
The main barrier to Tweaks in Swift is that they aren't loaded at load time — the code has to run to initialize the tweak. Without a workaround for that, it's hard to make it nearly as practical as in Objective-C, since you'll often end up with duplicate tweaks (if you create them within an object) or a lot of boilerplate code to store static instances of them.
I haven't come up with a good way to work around that, but I'm still looking. If one is found, I think that will be a good impetus to make the rest of Tweaks work well in Swift too.
Activity
grp commentedon Dec 24, 2015
I like that syntax!
The main barrier to Tweaks in Swift is that they aren't loaded at load time — the code has to run to initialize the tweak. Without a workaround for that, it's hard to make it nearly as practical as in Objective-C, since you'll often end up with duplicate tweaks (if you create them within an object) or a lot of boilerplate code to store static instances of them.
I haven't come up with a good way to work around that, but I'm still looking. If one is found, I think that will be a good impetus to make the rest of Tweaks work well in Swift too.
dulacp commentedon Jan 26, 2016
Some time ago I came up with this implement for a Swift tweak syntax.
Still there is the fact that it needs to run to be loaded, but it doesn't result in duplicates.