我想问一下然后回答这个问题.
我想更新我的应用程序内置的CocoaPods,所以我pod install从终端运行.
那是我收到这个错误的时候:
[!] The `APP_NAME [Debug]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
Run Code Online (Sandbox Code Playgroud)
你如何使用$(继承)标志?
我在Objective C中得到了这个循环,需要一些指导才能让它解决.我试图根据数组,数组中存储为字符串的数字来计算四个条的高度.largestTotal是一个字符串,包含数组中四个对象中最大的一个.我以前将数组中的每个元素格式化为货币.
for (int j=0; j<[array count]; j++) {
NSLog(@"%@ %@ %@",[NSString stringWithFormat:@"%d", j], [array objectAtIndex:j], biggestTotal);
double barHeight = (([[array objectAtIndex:j] doubleValue])*400.0/([biggestTotal doubleValue]));
NSLog(@"%@",barHeight);
CGRect currentRect = CGRectMake((150.0+(j*125.0)), (425.0-barHeight), 100.0, barHeight); // (x, y, width, height)
CGContextAddRect(context, currentRect);
CGContextDrawPath(context, kCGPathFillStroke);
}
Run Code Online (Sandbox Code Playgroud)
使用上面的NSLog语句,我获得如下控制台输出:
0 $106,758.20 $106,758.20
(null)
1 $14,536.69 $106,758.20
(null)
2 $32,111.96 $106,758.20
(null)
3 $100,020.00 $106,758.20
(null)
Run Code Online (Sandbox Code Playgroud)
还有,遗憾的是我没有酒吧.我在这里错过了什么?为什么barHeight是(null)?非常感激任何的帮助...
我创建了一个Constants.h文件,其中包含以下列表:
#define kw00 @"foo"
#define kw01 @"bar"
...
Run Code Online (Sandbox Code Playgroud)
我也在Constants.h.h中使用#import .使用newQuote方法,我想随机选择的一个kw strings,但我有困难,探索如何call a reference以一个constant是字符串中定义kwString.
-(IBAction)newQuote
{
int rNumber = arc4random() % kwTotal;
(rNumber <9)
{
NSString *kwString = [@"kw0" stringByAppendingString:[NSString stringWithFormat:@"%d", rNumber]];
}
}
Run Code Online (Sandbox Code Playgroud)
我们非常感谢您的想法和建议.