-
Notifications
You must be signed in to change notification settings - Fork 76
Caching, styling per window, load on demand, system font support + tests #111
Conversation
Classy caching
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikeger What was the motivation behind bootStrapClassy? When I moved to v0.2.5 my styling stopped working until I called bootstrapClassy in my app delegate application:didFinishLaunchingWithOptions: method. Is that the correct place to call it?
Classy/Parser/CASStyler.h
Outdated
@@ -12,7 +12,7 @@ | |||
|
|||
@interface CASStyler : NSObject | |||
|
|||
+ (void)bootstrapClassy; | |||
+ (void)bootstrapClassyWithTargetWindows:(NSArray *)targetWindows; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@killobatt Why was this change made, and how should one bootstrap Classy now? IE., what windows are to be provided when calling this?
cc: @mikeger
@dnedrow it's really nice to hear that someone is using Classy in production! Sorry for that change sneaking in, since the PR is from
Real-life use example can be found here: https://github.com/wireapp/wire-ios/blob/75f558d483324946ec846a7b600fef39db8fb09f/Wire-iOS/Sources/AppRootViewController.swift |
@mikeger cool, thanks. So calling bootstrapClassy as below should be an acceptable setup if there is no need for special window handling?
|
Yes, if (1) code is not executed in the app extension (then there is no |
Hey
We are having some updates for Classy, based on our most recent usage experience:
It might be needed to specify extra windows where Classy should apply the style, or alternatively turn it off for main window.
Our CAS file is taking about 500ms to parse, so we decided to cache it to binary plist using
NSCoding
, Classy supports nowid<CASCacheProtocol> cache
property to modify the caching behaviourIf app is starting on the background for performing the background tasks (APNS, VoIP, etc) we don't want nether to start Classy, nor to do any activity on views/windows
iOS 9 added
SanFrancisco
font family, which is hard to mention by nameAlso contains tests for some of this functionality. Sorry for such a big PR.