小编Pad*_*ika的帖子

popover iOS8中的setContentViewController方法导致应用程序崩溃

UIPopoverController中的setContentViewController方法似乎导致iOS 8中的应用程序崩溃.只是想知道是否还有其他人在iOS 8中遇到此问题.这在iOS 7中没有任何问题.

异常中指出的错误似乎是误导性的,因为它声明应该在呈现弹出窗口后调用setContentViewController

- (void)buttonPressed {

UIViewController *tableViewController = [UIViewController new];

if(_popover == nil){

    _popover = [[UIPopoverController alloc] initWithContentViewController:tableViewController];

    [_popover presentPopoverFromRect:CGRectMake(self.textField.frame.size.width / 2, self.textField.frame.size.height / 1, 1, 1) inView:self.textField permittedArrowDirections:UIPopoverArrowDirectionLeft animated:YES];
}else{
    [_popover setContentViewController:tableViewController];
}    
Run Code Online (Sandbox Code Playgroud)

}

这是崩溃的堆栈跟踪,

2014-09-11 16:48:39.904 iOS 8 Rotation[3969:67869] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIPopoverController setContentViewController:animated:] can only be called after the popover has been presented.'
*** First throw call stack:
(
    0   CoreFoundation                      0x01c79df6 __exceptionPreprocess + 182
    1   libobjc.A.dylib                     0x01903a97 …
Run Code Online (Sandbox Code Playgroud)

uipopovercontroller ios uipopover xcode6 ios8

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

CQL3每行都有自己的架构

我想在.Net应用程序中使用Cassandra.我的目标是将一些数据存储在列族中,但每行数据都有不同的模式.

示例(非常简单)我希望有一个'Toys'列系列来存储以下对象,(注意它们除了ID属性之外还有非常不同的属性)

玩具对象1 {"id":"1","name":"Car","number_of_doors":4,"赞":3}

玩具对象2 {"id":"2","type":"Plane","flying_range":"100m"}

玩具对象3 {"id":"3","category":"Train","number_of_carriages":10}

从我最初的理解和使用Datastax CSharp驱动程序开始,我必须始终改变不适合我的表(Column系列).我希望每一行都有自己的架构.Thrift API可能能够解决这个问题,但似乎HectorSharp几乎已经死了.

一个类似于我的要求的问题,但它没有我想要的答案

Cassandra用于无模式数据库,每天有数百万个订单表和数百万个查询

我是通过期望每一行都有自己的架构来咆哮错误的树,还是有办法用Cassandra + Csharp做到这一点?

提前感谢您的回答.

c# cassandra cql3

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

标签 统计

c# ×1

cassandra ×1

cql3 ×1

ios ×1

ios8 ×1

uipopover ×1

uipopovercontroller ×1

xcode6 ×1