Skip to content

Releases: railsware/BloodMagic

Major release

11 Aug 10:29

Choose a tag to compare

This version is incompatible with previous one

Lazy module was separated into Lazy and Injectable: Lazy could be used for lazy initialization, and Injectable for dependency injection.
This way any BloodMagic' component could be easily replaced or removed. so you're pretty safe to use it in your project.

Skip undefined protocol silently

30 May 07:05

Choose a tag to compare

Preferences

18 Apr 19:13

Choose a tag to compare

Preferences

pod 'BloodMagic/Preference', :git => 'https://github.com/railsware/BloodMagic.git'

Enjoy the simplest way to deal with NSUserDefaults

#import <BloodMagic/Preference.h>

@interface Settings : NSObject
        <BMPreference>

@property (nonatomic, strong, bm_preference) NSString *nickname;

@end

@implementation Settings

@dynamic nickname;

@end

// ...

Settings *settings = [Settings new];
settings.nickname = @"AlexDenisov"; // @"AlexDenisov" goes to [NSUserDefaults standardUserDefaults] with key "nickname"
NSLog(@"My name is: %@", settings.nickname); // reads object for key "nickname" from [NSUserDefaults standardUserDefaults]

Lazy loading hooks

22 Mar 09:48

Choose a tag to compare

BMLazy module provides a hook system to catch the object creation.
To enable these hooks just create instance method named propertyNameInjected:

For example:

@implementation ViewController

@lazy(progressViewService)

- (void)progressViewServiceInjected:(ProgressViewService *service)
{
    service.title = self.title;
}

@end

Multiple attributes support

15 Feb 17:27

Choose a tag to compare

From now you can use multiple different attributes per one class

#import <BloodMagic/Lazy.h>
#import <BloodMagic/Partial.h>

@interface ViewController : UIViewController
    <BMLazy,
    BMPartial>

@property (nonatomic, strong) ProgressViewService *progressViewService;
@property (nonatomic, strong) HeaderView *headerView;

@end

@implementation ViewController

@lazy(progressViewService)
@partial(headerView)

@end

Assign-once properties

06 Feb 16:55

Choose a tag to compare

Added support of assign-once properties, like final in Java.

Added Partial views support

17 Jan 05:11

Choose a tag to compare

Added support of partial views: BMPartial
Added empty macro definitions: bm_lazy, bm_partial

Performance improvement

16 Dec 21:30

Choose a tag to compare

A lot of performance improvements.
Almost all collectors and finders use cache to achieve better performance.
BM uses STL for data caching.

Added ability to change default initializer

17 Jan 05:06

Choose a tag to compare

Ability to exclude class from magic hierarchy

20 Nov 08:08

Choose a tag to compare

Added ability to exclude class from magic hierarchy (details), thanks to Eugene Solodovnykov