CorePlot通过cocoaPod安装报错的解决方法

来源:互联网 发布:淘宝爆款软件 编辑:程序博客网 时间:2024/05/21 19:50

今天想通过cocoapod安装CorePlot  安装成功  但运行时报错(我的Xcode版本是最新的6.4)

too many arguments to function call,expected 0,have3

网上百度了下都说把Bulid Setting-->Enable Strict Checking of msg_Send Calls中的Yes 改成No;



可是我按照这样的步骤做了  还是一点成效都没有  错误还是依然在那报着  依旧在百度

然后再http://stackoverflow.com网站找到了答案  在这几部分做修改就好了

CPTAnimation.m

-(void)updateOnMainThreadWithParameters:(NSDictionary *)parameters

             if ( [tweenedValue isKindOfClass:[NSDecimalNumber class]] ) {                 NSDecimal buffer = [(NSDecimalNumber *)tweenedValue decimalValue]; -                IMP setterMethod = [boundObject methodForSelector:boundSetter];+                typedef void (*SetterType)(id, SEL, NSDecimal);+                SetterType setterMethod = (SetterType)[boundObject methodForSelector:boundSetter];                 setterMethod(boundObject, boundSetter, buffer);             }             else if ( [tweenedValue isKindOfClass:[NSValue class]] ) {                 NSValue *value = (NSValue *)tweenedValue;                  NSUInteger bufferSize = 0;                 NSGetSizeAndAlignment(value.objCType, &bufferSize, NULL);                  NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[boundObject methodSignatureForSelector:boundSetter]];                 [invocation setTarget:boundObject];                 [invocation setSelector:boundSetter];                  void *buffer = malloc(bufferSize);                 [value getValue:buffer];                 [invocation setArgument:buffer atIndex:2];                 free(buffer);                  [invocation invoke];             }             else { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-performSelector-leaks"                 id<NSObject> theObject = boundObject;


_CPTAnimationPlotRangePeriod.m
 -(void)setStartValueFromObject:(id)boundObject propertyGetter:(SEL)boundGetter {-    IMP getterMethod = [boundObject methodForSelector:boundGetter];+    typedef NSValue *(*GetterType)(id, SEL);+    GetterType getterMethod = (GetterType)[boundObject methodForSelector:boundGetter];      self.startValue = getterMethod(boundObject, boundGetter); }  -(BOOL)canStartWithValueFromObject:(id)boundObject propertyGetter:(SEL)boundGetter {-    IMP getterMethod = [boundObject methodForSelector:boundGetter];+    typedef CPTPlotRange *(*GetterType)(id, SEL);+    GetterType getterMethod = (GetterType)[boundObject methodForSelector:boundGetter];      CPTPlotRange *current = getterMethod(boundObject, boundGetter);     CPTPlotRange *start   = (CPTPlotRange *)self.startValue;

经这番修改后  编译成功了

不得不说 栈溢出 这个网站还是非常好的  我在里面找到了很多解决问题的方法  

 

1 0
原创粉丝点击