eleme / Stinger

Stinger is a high-efficiency library with great compatibility, for aop in Objective-C, using libffi instead of Objective-C message forwarding. It is 20+ times faster than the Aspects, from message-sending to Aspect-oriented code ends.
MIT License
996 stars 127 forks source link

ffiTypeWithType does not match 'CGSize' #6

Closed wangwanjie closed 4 years ago

wangwanjie commented 4 years ago

你好,看了是饿了么团队出品,我就用中文了。 项目中有较多地方使用Aspects,正在换 Stinger,遇到点问题,我有一个分类监听 UIScrollView contentSize 变化,使用 Stinger 无法正确工作,上代码: crash at 'can't match a ffi_type of {CGSize=dd}'

`

import "UIScrollView+ContentSizeChangedHandler.h"

import <objc/runtime.h>

import <Stinger/Stinger.h>

static NSString *const kID = @"UIScrollView.setContentSize.after";

@interface UIScrollView () @property (nonatomic, assign) CGSize wj_contentSizeChangedHandler_oldContentSize; ///< 旧 contentSize @end

@implementation UIScrollView (ContentSizeChangedHandler)

Assuner-Lee commented 4 years ago

下面有计划适配参数类型为结构体,目前是不支持的

Assuner-Lee commented 4 years ago

马上排计划,不让同志们失望

wangwanjie commented 4 years ago

马上排计划,不让同志们失望

好的,谢谢啦

Assuner-Lee commented 4 years ago

马上排计划,不让同志们失望

好的,谢谢啦

已经发布新版0.2.6