DKNightVersion的@pickerify(KCLASS,PROPERTY)有一个问题

时间:2019-12-24 08:29:18

标签: objective-c-2.0

元编程@pickerify(KCLASS,PROPERTY)被多个文件引用时会发出警告,因为它包含相同实现的多个方法。您如何解决这个问题? 例:    FileA:

    // Create new views (invoked by the layout manager)
    @Override
    public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        VST pkg = mVstMan.loadPackage(mActivity, mVstMan.getPackages(mActivity)[0].packageName, false);
        VST.CLASS vstClass = mVstMan.loadClass(pkg, "main");
        Object vstClassInstance = mVstMan.newInstance(vstClass, "main");
        // android.widget.RelativeLayout cannot be cast to android.widget.LinearLayout
        LinearLayout x = new LinearLayout(mActivity);
        x.addView((ViewGroup) mVstMan.invokeMethod(
                        vstClass, vstClassInstance,
                        "onViewRequest", Context.class,
                        pkg.activityApplicationContext
                )
        );
        return new MyViewHolder(x);
    }

文件B:

@pickerify(UITableView, cellTintColor);
@implement A {
    ......
}

Xcode会发出警告。如何解决?

0 个答案:

没有答案