我有一个异常崩溃问题,我正在尝试编辑此文件以获取有关崩溃的更多信息..gdbinit位于何处,如何编辑?谢谢
我正在处理一个项目,我需要从现有帧合成视频,然后像网络摄像头设备一样对其进行格式化,并使其可用于外部计算机。换句话说,这个 USB 输出应该看起来就像是由网络摄像头生成的。有人可以提供有关任何现有库或执行此操作的任何方法的一些提示吗?通过 USB 创建“网络摄像头”输出的目标系统是 UBUNTU。
谢谢
我的应用程序运行良好,直到今天它开始崩溃:[self.window makeKeyAndVisible]; 在app委托.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
self.viewController = [[ViewControllerWordHelper alloc] initWithNibName:@"ViewControllerWordHelper_iPhone1" bundle:nil];
} else {
self.viewController = [[ViewControllerWordHelper alloc] initWithNibName:@"ViewControllerWordHelper_iPhone" bundle:nil];
}
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
Run Code Online (Sandbox Code Playgroud)
如果我调试并在[self.window makeKeyAndVisible]中进入,则崩溃前的下一个语句是"@synthesize window = _window;" 在同一个应用程序委托中.
过去工作的所有以前版本的行为都相同.
我重新启动了我的电脑,但仍然发生了同样的情况.我正在使用XCode 4.2.在xcode设置中有什么我可能不小心改变了吗?
谢谢你的帮助.
以下是整个调试窗口:
`GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 15 16:03:10 UTC 2011)
Copyright 2004 …Run Code Online (Sandbox Code Playgroud) 我viewDidLoad在视图控制器中被调用两次.一旦通过[UIViewController View],并通过第二次[UINib instanciateWithOwner:Options].为什么会这样?可以预防吗?
谢谢
uiviewcontroller uikit viewdidload ios viewcontroller-lifecyle
在根模型中,我有:
[self.rPrices replaceObjectAtIndex:0
withObject:[NSNumber numberWithFloat:(float)nR4]];
NSLog(@"%.2f", [self.rPrices objectAtIndex:0]);
Run Code Online (Sandbox Code Playgroud)
rPrices在哪里NSMutableArray.
nR4不为零,但上面NSLog(...);显示为零.
谢谢
我有以下代码:
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
formatter.dateFormat = @"yyyy-mm-dd";
NSDate *cDate = [formatter dateFromString:thisLine];
NSLog(@"cDate '%@' thisLine '%@'", cDate, thisLine);
Run Code Online (Sandbox Code Playgroud)
NSLog打印:cDate'2011-01-10 05:07:00 +0000'hisLine'2011-07-10'而cDate应该是'2011-07-10'
有什么想法吗?
谢谢
我已经完成了临时配置文件,它在管理器中正确显示.Iphone设备也被列出,它旁边是一个绿色的小圆圈.
但是,在xcode中,设备未列出且无法挑选.
可能是什么问题.
我的主窗口上有一个标签栏.每个单独的选项卡项都有自己的视图.如何启用/禁用其他标签项视图中的其他标签项?
我使用atoaf([myNSNumberobject UTF8String])它有效,但给了我一个警告:
NSNumber可能无法响应UTF8String
如何将NSNumber转换为float?
我有一个视图控制器类,代码如下:
-(void) awakeFromNib{
RootModel *rm = [RootModel sharedModel];
for(NSString *title in rm.rLevels) {
[self addNewButtonWithTitle:title];
}
}
// add a new button with the given title to the bottom of the list
- (void)addNewButtonWithTitle:(NSString *)title
{
// create a new button
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
}
Run Code Online (Sandbox Code Playgroud)
该声明
[self addNewButtonWithTitle:title];
Run Code Online (Sandbox Code Playgroud)
生成警告:找不到方法addNewButtonWithTitle.
不知道了.
谢谢
NSArray *Lines = [StringData componentsSeparatedByString:@"\n"];
for (NSArray *ThisLine in Lines){
NSArray *Items = [ThisLine componentsSeparatedByString:@","];
...
}
Run Code Online (Sandbox Code Playgroud)
我收到警告NSArray可能无法响应componentsSeparatedByString.
有什么想法吗?
根本不调用init和initWithNibName,但调用viewDidLoad.任何想法?
这是非常基本的,但我不知道该怎么做.如何从所有元素中清除NSMutableArray对象.我想将数组设置为创建时的状态:
NSMutableArray *myArray = [[NSMutableArray alloc] init];
Run Code Online (Sandbox Code Playgroud)
谢谢