excuse me. I want to use block as my property in category to change my code style as follows, but there is something wrong and I don't know why.  

Here is my code :  

```

```
typedef NSString* (^MethodreplacingRangeWithString)(NSRange range,NSString * string);
typedef NSString* (^MethodAppend)(NSString *) ;
@interface NSString (Speech)
@property(nonatomic ,copy)MethodreplacingRangeWithString replacingRangeWithString ;
@property(nonatomic, copy)MethodAppend append ;
+(void)speech:(NSString *)content;
@end

@implementation NSString (Speech)

//setter and getter
static NSString * a = @"replacingRangeWithString" ;
-(void)setReplacingRangeWithString:(MethodreplacingRangeWithString)replacingRangeWithString{
    objc_setAssociatedObject(self, @selector(replacingRangeWithString), replacingRangeWithString, OBJC_ASSOCIATION_RETAIN_NONATOMIC) ;
}
-(MethodreplacingRangeWithString)replacingRangeWithString{
    return objc_getAssociatedObject(self, @selector(replacingRangeWithString)) ;
}

//setter and getter
static NSString * b = @"append" ;
-(void)setAppend:(MethodAppend)append{
    objc_setAssociatedObject(self, @selector(append), append,OBJC_ASSOCIATION_RETAIN_NONATOMIC) ;
}
-(MethodAppend)append{
    return objc_getAssociatedObject(self, @selector(append)) ;
}
//block
-(void)configureReplacingRangeWithStringProperty{
    __weak typeof (self) weakSelf = self ;
    self.replacingRangeWithString =  ^(NSRange range,NSString * str){
        return [weakSelf stringByReplacingCharactersInRange:range withString:str];
    };
}
-(void)configureAppend{
    __weak typeof (self)weakSelf = self ;
    self.append = ^(NSString *str){
        return [weakSelf stringByAppendingString:str] ;
    };
}

```

`to change the style as follows :`

```
NSString * str = @"hello world" ;
        [str configureAppend] ;
        [str configureReplacingRangeWithStringProperty] ;
        str = str.replacingRangeWithString(NSMakeRange(6, 5),@"iOS").append(@" hhhhh") ;

```

```

here is sth wrong with my configures and I don't know why