在对iPhone应用程序进行更改时,我保存并编译了; 得到了以下错误......解开了一切,我现在陷入了这些错误.我已经尝试清理构建,从这个文件夹复制文件,尝试在另一台机器上构建.我无法想到解决它,我所做的改变是.xib文件; 我删除了IBOutlet,因为我不再需要该元素.
有谁知道如何解决这些问题 - >对于长调试输出感到抱歉但是认为太多信息会比太少更好.
Build Hunter of project Hunter with configuration Debug
ProcessPCH /var/folders/di/diNSUsegESCJmVpYf71u4U+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Hunter_Prefix-ewmgimmftydqkieofchvanjjzzvq/Hunter_Prefix.pch.pth Hunter_Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd "/Users/stuartloxton/Documents/Hunter New"
setenv LANG en_US.US-ASCII
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -x objective-c-header -arch i386 -fmessage-length=0 -pipe -fdiagnostics-print-source-range-info -std=c99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk -fasm-blocks -mmacosx-version-min=10.6 -gdwarf-2 -fvisibility=hidden -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote "/Users/stuartloxton/Documents/Hunter New/build/Hunter.build/Debug-iphonesimulator/Hunter.build/Hunter-generated-files.hmap" "-I/Users/stuartloxton/Documents/Hunter New/build/Hunter.build/Debug-iphonesimulator/Hunter.build/Hunter-own-target-headers.hmap" "-I/Users/stuartloxton/Documents/Hunter New/build/Hunter.build/Debug-iphonesimulator/Hunter.build/Hunter-all-target-headers.hmap" -iquote "/Users/stuartloxton/Documents/Hunter New/build/Hunter.build/Debug-iphonesimulator/Hunter.build/Hunter-project-headers.hmap" "-F/Users/stuartloxton/Documents/Hunter New/build/Debug-iphonesimulator" "-F/Users/stuartloxton/Documents/Hunter New" "-I/Users/stuartloxton/Documents/Hunter New/build/Debug-iphonesimulator/include" "-I/Users/stuartloxton/Documents/Hunter New/build/Hunter.build/Debug-iphonesimulator/Hunter.build/DerivedSources/i386" "-I/Users/stuartloxton/Documents/Hunter New/build/Hunter.build/Debug-iphonesimulator/Hunter.build/DerivedSources" -c "/Users/stuartloxton/Documents/Hunter New/Hunter_Prefix.pch" -o /var/folders/di/diNSUsegESCJmVpYf71u4U+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Hunter_Prefix-ewmgimmftydqkieofchvanjjzzvq/Hunter_Prefix.pch.pth
In file included …Run Code Online (Sandbox Code Playgroud) 我正在从一本书(Mac OS X的Cocoa编程)中自学Objective-C,但是我已经有一半了但是我有两个问题没有在书中得到解答或定义.
在定义类方法时(假设存在于.h文件中)之间有什么区别:
- (int)人口;
+(int)人口;
我现在看到的方式是-方法要求首先分配和初始化类,但是+可以静态调用,而不需要分配和初始化.例如(在另一个类的函数中)
// Using -
Earth *world = [[Earth alloc] init];
int population = [world population];
// Using +
int population = [Earth population];
Run Code Online (Sandbox Code Playgroud)
如果这是正确的,我何时应该使用静态方法,这样做是否有任何缺点.
在函数参数中定义var或在函数中定义var时,是否使用*表示var将是一个对象?例如(再次在头文件中.)
- (void)setPopulation :( NSNumber*)人口; //使用*作为人口是NSNumber
- (void)setPopulation:(int)population; //人口不是一个类,所以不需要*
很抱歉,如果我的任何术语在Objective-C领域没有意义,例如静态方法等.我是PHP和Ruby程序员.