所以我为我的学校做了一个rss阅读器,并完成了代码。我运行了测试,它给了我这个错误。下面是它引用的代码:

- (UITableViewCell *)tableView:(UITableView *)tableView 
         cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = 
     [tableView dequeueReusableCellWithIdentifier:CellIdentifier 
                                     forIndexPath:indexPath];
    if (cell == nil) {

        cell = 
         [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle  
                                reuseIdentifier:CellIdentifier];

    }

以下是输出中的错误:

2012-10-04 20:13:05.356 Reader[4390:c07] * Assertion failure in -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:], /SourceCache/UIKit_Sim/UIKit-2372/UITableView.m:4460 2012-10-04 20:13:05.357 Reader[4390:c07] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier Cell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard' * First throw call stack: (0x1c91012 0x10cee7e 0x1c90e78 0xb64f35 0xc7d14 0x39ff 0xd0f4b 0xd101f 0xb980b 0xca19b 0x6692d 0x10e26b0 0x228dfc0 0x228233c 0x228deaf 0x1058cd 0x4e1a6 0x4ccbf 0x4cbd9 0x4be34 0x4bc6e 0x4ca29 0x4f922 0xf9fec 0x46bc4 0x47311 0x2cf3 0x137b7 0x13da7 0x14fab 0x26315 0x2724b 0x18cf8 0x1becdf9 0x1becad0 0x1c06bf5 0x1c06962 0x1c37bb6 0x1c36f44 0x1c36e1b 0x147da 0x1665c 0x2a02 0x2935) libc++abi.dylib: terminate called throwing an exception

下面是它在错误屏幕上显示的代码:

int main(int argc, char *argv[])
{
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
    }
}

请帮助!

有办法打印值布尔标志在NSLog?

在ios7中,sizeWithFont:现在已弃用。我现在如何在UIFont对象传递到替换方法sizeWithAttributes:?

我想知道如何以正确的方式使用这些属性。

据我所知,frame可以从我正在创建的视图的容器中使用。 它设置了相对于容器视图的视图位置。它还设置了视图的大小。

也可以从我正在创建的视图容器中使用center。此属性更改视图相对于其容器的位置。

最后,bounds是相对于视图本身的。它改变了视图的可绘制区域。

你能提供更多关于框架和边界关系的信息吗?clipsToBounds和masksToBounds属性如何?

是否有可能使用标准属性语法将块作为属性?

ARC有什么变化吗?

对Objective-C代码进行单元测试的框架是什么?我想要一个框架,很好地集成与苹果Xcode。

我听说过一些实现标签的方法;使用TagID和ItemID之间的映射表(对我来说有意义,但它是否缩放?),向ItemID添加固定数量的可能的TagID列(似乎是个坏主意),在文本列中保留逗号分隔的标签(听起来很疯狂,但可以工作)。我甚至听说有人建议使用稀疏矩阵,但是标签名如何优雅地增长呢?

我是否错过了标签的最佳实践?

我的单例访问方法通常是一些变种:

static MyClass *gInstance = NULL;

+ (MyClass *)instance
{
    @synchronized(self)
    {
        if (gInstance == NULL)
            gInstance = [[self alloc] init];
    }

    return(gInstance);
}

我能做些什么来改善这一点呢?

假设我有一个名为SomeClass的类,它有一个字符串属性名:

@interface SomeClass : NSObject
{
    NSString* name;
}

@property (nonatomic, retain) NSString* name;

@end

我知道,名字可以被分配一个NSMutableString在这种情况下,这可能会导致错误的行为。

对于一般的字符串,使用copy属性而不是retain属性总是一个好主意吗? “复制”的属性是否比“保留”的属性效率低?

我怎么能让一个UIScrollView滚动到我的代码底部?或者用更一般的方式,到子视图的任意点?