preface

Users of TABAnimated may need to adjust their skeleton properties using preprocessing callbacks. Xcode InjectionIII can now be used in conjunction with the real-time preview effect, greatly improving the efficiency of use. Upgrade version 2.4.5 is required

What is a preprocessing callback?

_tableView.tabAnimated.adjustBlock = ^(TABComponentManager * _Nonnull manager) {
        manager.animation(1).down(3).height(12);
        manager.animation(2).height(12).reducedWidth(70);
        manager.animation(3).down(-5).height(12).radius(0.).reducedWidth(-20);
};
Copy the code

Preprocessing callbacks can adjust all parameters of the skeleton at will and are used very frequently. However, if developers compile and run frequently, then go to the fixed page to see the effect, it is very inefficient.

What is InjectionIII?

InjectionIII listens to this file and uses Runtime to compile, link, and run your changes in real time.

TABAnimated + InjectionIII effect

Using the step

1. Download InjectionIII

Go to the AppStore and download InjectionIII and start

2. The project is bound to InjectionIII plug-in

3. If you are lazy load form initialization controller (not please ignore)

Embed the following code in the corresponding viewController

- (void)injected {
    [_tableView removeFromSuperview];
    _tableView = nil;
    [self viewDidLoad];
}
Copy the code

This is not the reason why you don’t need to embed code: The skeleton screen automatically links the viewDidLoad function to load, because it can’t uniformly locate the _tableView’s address in the viewController, it can’t automatically remove and release it.

4. After editing, save command+ S to compile in real time

If you modify the code for the skeleton screen preprocessing callback, you can see the skeleton screen effect in real time, and all the test cases in the demo use this effect.

Other instructions

  • The skeleton screen TABAnimated needs to be upgraded to fit InjectionIII perfectly.
  • You can see changes to any code in real time, not just TABAnimated.
  • InjectionIII does not support real machines
  • If you can’t preview in real time, go to the InjectionIII address