小编Joe*_*ner的帖子

库链接但Xcode说"找不到文件".

这刚开始发生在我的项目中,我不知道该怎么做.

我一直在使用Parse框架,到目前为止一切都很好.但是现在,即使包含了库:

在此输入图像描述

和链接:

在此输入图像描述

当我将它导入类时,我仍然会收到"'Parse/Parse.h'文件未找到"错误.甚至更奇怪(至少对我而言),该项目仍在构建和运行.当我构建或清理项目时,警告消失,但随后它立即重新出现.

知道如何解决这个问题吗?

xcode ios

3
推荐指数
1
解决办法
3412
查看次数

在XCode 4.3中向项目添加外部库

新手在这里,试图将CHDataStructures库添加到我正在进行的计算器项目中.我按照在将静态库链接到XCode 4中的iOS项目的接受答案中的建议做了,最后得到了这个:

添加了库的XCode

不幸的是,'CHDataStructures.h' file not found当我尝试将标题添加到项目中的类时(Calculator.m例如),我收到错误.

有关如何让CHDataStructures库像死星一样全面运作的任何想法?

编辑

好的,这是尝试两者$(SRCROOT)和绝对路径.有什么想法吗?

与`$(SRCROOT)

绝对路径

objective-c ios5 xcode4.2

2
推荐指数
1
解决办法
2万
查看次数

从XCode 4.5 DP4更新到XCode 4.5后,应用程序在模拟器上运行,但在设备上运行

我是新手,如果我收集太多(或太少)信息,请原谅我.我尝试删除派生数据并重新启动XCode,这是我在另一个类似于这个问题上看到的建议,但我仍然得到相同的三个错误消息:

Apple Mach-O链接器错误:链接器命令失败,退出代码为1

Ld /Users/joel/Library/Developer/Xcode/DerivedData/GayHaiku-crhnnbsqptnxaogjezyomdzplbag/Build/Intermediates/GayHaiku.build/Debug-iphoneos/GayHaiku.build/Objects-normal/armv7s/GayHaiku normal armv7s
cd /Users/joel/Desktop/GayHaiku
setenv IPHONEOS_DEPLOYMENT_TARGET 6.0
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -L/Users/joel/Library/Developer/Xcode/DerivedData/GayHaiku-crhnnbsqptnxaogjezyomdzplbag/Build/Products/Debug-iphoneos -L/Users/joel/Desktop/GayHaiku/facebook-ios-sdk/build/facebook-ios-sdk.build/Release-iphoneos/facebook-ios-sdk.build/Objects-normal/armv6 -L/Users/joel/Desktop/GayHaiku/facebook-ios-sdk/build/facebook-ios-sdk.build/Release-iphoneos/facebook-ios-sdk.build/Objects-normal/armv7 -L/Users/joel/Desktop/GayHaiku/facebook-ios-sdk/build/Release-iphoneos -L/Users/joel/Desktop/GayHaiku/facebook-ios-sdk/build/Release-iphonesimulator -L/Users/joel/Desktop/GayHaiku/facebook-ios-sdk/lib/facebook-ios-sdk -F/Users/joel/Library/Developer/Xcode/DerivedData/GayHaiku-crhnnbsqptnxaogjezyomdzplbag/Build/Products/Debug-iphoneos -F/Users/joel/Desktop/GayHaiku -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Users/joel/Library/Developer/Xcode/DerivedData/GayHaiku-crhnnbsqptnxaogjezyomdzplbag/Build/Intermediates/GayHaiku.build/Debug-iphoneos/GayHaiku.build/Objects-normal/armv7s/GayHaiku.LinkFileList -dead_strip -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=6.0 -framework Accounts -framework Social -framework CFNetwork -lsqlite3 -lz.1.1.3 -framework MobileCoreServices -framework Security -framework StoreKit -framework SystemConfiguration -framework AudioToolbox -framework Twitter -framework QuartzCore -framework MessageUI -framework UIKit -framework Foundation -framework CoreGraphics -framework Parse -o /Users/joel/Library/Developer/Xcode/DerivedData/GayHaiku-crhnnbsqptnxaogjezyomdzplbag/Build/Intermediates/GayHaiku.build/Debug-iphoneos/GayHaiku.build/Objects-normal/armv7s/GayHaiku

ld: file is universal (3 slices) but does not contain a(n) …
Run Code Online (Sandbox Code Playgroud)

ios6 xcode4.5

1
推荐指数
1
解决办法
6062
查看次数

什么是 - >运算符在-copyWithZone中执行:?

可能重复:
C 点(".")运算符中的箭头运算符( - >)用法
和箭头(" - >")运算符用于C与Objective-C

我是一个新手,看着2008年最新更新的免费软件/开源程序,我不承认->以下符号:

- (id)copyWithZone:(NSZone *)zone
{
  GFIPGeniusItem * newItem = [[[self class] allocWithZone:zone] init];
  newItem->_stringValue = [_stringValue copy];
  newItem->_imageURL = [_imageURL copy];
  newItem->_webResourceURL = [_webResourceURL copy];
  newItem->_speakableStringValue = [_speakableStringValue copy];
  newItem->_soundURL = [_soundURL copy];
  return newItem;
}
Run Code Online (Sandbox Code Playgroud)

我假设它允许某种捷径,但我特别喜欢它的功能.

objective-c ios

1
推荐指数
1
解决办法
612
查看次数

当我改变UITabBar的颜色时,它只显示为灰色

我在我的选项卡式应用程序的各种视图控制器的'viewDidLoad'中使用以下代码.

    UIColor *tabBarColor = [UIColor colorWithRed:85.1 green:57.6 blue:71.4 alpha:.5];
    [[UITabBar appearance] setTintColor:tabBarColor];
Run Code Online (Sandbox Code Playgroud)

但是我得到的图像应该是粉红色的:

在此输入图像描述

我可以通过改变alpha来使它更亮或更暗,但从不着色 - 只有黑/白/灰色.

有关如何解决这个问题的任何想法?

objective-c uitabbar ios

1
推荐指数
1
解决办法
542
查看次数

如何在Objective C中用另一个子串替换一个子串?

我想NSString用Objective C中的另一个子串替换子串.

我知道如何找到我想要替换的子字符串:

        NSRange range = [string rangeOfString:substringIWantToReplace];
        NSString *substring = [string substringFromIndex:NSMaxRange(range)];
Run Code Online (Sandbox Code Playgroud)

但是当涉及到实际移除/替换它时,我有点困惑.我是否在使用另一个子串C++替换substring的C++方法?或者C方法如何替换c中的子串??在Objective-C上有一个相关的问题:子串和替换,但是有问题的字符串是一个URL,所以我认为我不能使用答案.

substring objective-c nsstring

1
推荐指数
1
解决办法
1686
查看次数

-1
推荐指数
1
解决办法
1644
查看次数

标签 统计

objective-c ×5

ios ×3

ios5 ×2

ios6 ×1

nsstring ×1

substring ×1

uitabbar ×1

xcode ×1

xcode4.2 ×1

xcode4.3 ×1

xcode4.5 ×1