我见过一些人拒绝使用Interface Builder,而更喜欢使用代码制作一切.这不是有点乏味,不需要更长时间吗?为什么人们会这样做?
具有以下代码并在for语句初始化中的xs处获得上述错误.是不是在Xcode 3中得到它,只是在我今天安装Xcode 4时出现了.xs是一个
int xs = 0;
for (xs; xs<3; xs++) {
if ([colorLayoutArray objectAtIndex:xs] == [colorLayoutArray objectAtIndex:xs+1]){
rowCorrectCount = rowCorrectCount +1;}
}
Run Code Online (Sandbox Code Playgroud)
有线索吗?
在过去的一些Web文章中,我在Xcode中看到一个选项,使用"UITableViewCell子类"模板添加新文件.例如这里.
我自己在Xcode中看不到这个(我有最新版本,x4的v4).
有人知道这是什么一回事吗?
在Xcode 3中,我能够选择窗口左上角的旋转箭头来设计横向应用程序的窗口.但是,我在Xcode 4中找不到相同的功能.任何人都可以帮忙吗?
谢谢.
如何在XCode中屏蔽不需要的"死店"警告?这就是我有这个代码,我不认为这是一个问题,所以如果是这种情况我不想继续看到警告......(欢迎提供反馈)
代码在这里:
// Position and Size Labels in Cell
CGFloat currVertPos = 0; // Maintain lowest position, i.e. starting vertical point for next cell
// Set Position & Get back next veritical position to use
currVertPos = [self resizeLabel:_mainLabel atVertPos:currVertPos];
currVertPos = [self resizeLabel:_mainLabel2 atVertPos:currVertPos];
currVertPos = [self resizeLabel:_mainLabel3 atVertPos:currVertPos];
currVertPos = [self resizeLabel:self.secondLabel atVertPos:currVertPos]; // WARNING OCCURS HERE
Run Code Online (Sandbox Code Playgroud)
警告详细信息=永远不会读取存储在"currVertPos"处的值.
所以对于最后一行来说,确实不需要"currVertPos",但这真的很重要,如果不是,我怎么能使警告静音?
我只是找不到Xcode 4中的"创建iPad版本"按钮,因为我想在iPad XIB中打开iPhone XIB,有人知道我在Xcode4中找到这个按钮的位置吗?
Xcode 3有一个漂亮的小部件小部件http://cagefreesoftware.com/images/splitScreenWidget.png将一个编辑屏幕分成两部分.我没有在Xcode 4中看到这一点.苹果公司是否认定我不再需要它了?;-)
我在Xcode命令行工具项目中添加了一个简单的类.课程如下:
#import <Foundation/Foundation.h>
@interface Foo : NSObject {
}
@end
Run Code Online (Sandbox Code Playgroud)
和
#import "Foo.h"
@implementation Foo
@end
Run Code Online (Sandbox Code Playgroud)
当我引用了foo.h用#import "Foo.h"在我的主文件,我得到的所有类型的错误.我将Foundation.frameowork添加为我的框架.
/Developer/SDKs/MacOSX10.6.sdk/System/
Library/Frameworks/Foundation.framework/Headers/
NSObjCRuntime.h:189:1: error: expected identifier or '(' [3]
/Developer/SDKs/MacOSX10.6.sdk/System/
Library/Frameworks/Foundation.framework/Headers/
NSObjCRuntime.h:197:50: error: unknown type name 'Protocol' [3]
我正在使用MacRuby 0.10和XCode 4,我在其中创建了一个默认的基于NSDocument的应用程序.但是,在构建和运行应用程序时,不会显示任何窗口,并且通常会禁用通常的菜单命令.
在创建常规的基于Cocoa的应用程序时,主应用程序窗口显示正常.
有谁知道修复是什么?
担;
xcode4 ×10
xcode ×5
ios ×3
objective-c ×3
ipad ×2
iphone ×2
cocoa ×1
cocoa-touch ×1
entity ×1
macruby ×1
uitableview ×1