小编sen*_*thu的帖子

不支持多次推送同一个视图控制器实例?

我有一个普通的 UIViewCONtroller(home),其中我有 IBAction 方法,例如

- (IBAction)goto1:(id)sender
{

self. goto1Controller.modalTransitionStyle =   UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:self. goto1Controller animated:YES];
}
Run Code Online (Sandbox Code Playgroud)

它工作正常。goto1Controller 是一个普通的 UIViewcontroller,其中我通过用户定义的导航控制器使用了一个动作,通过它我转到另一个控制器,如 self.goto1Controller

- (IBAction)goto2:(id)sender
 {      
    [userdefNavController pushViewController:goto2Controller animated:YES];
[self presentModalViewController: userdefNavController animated:NO];
}
Run Code Online (Sandbox Code Playgroud)

我从 goto2Controller 回到 goto1Controller 通过

     [self dismissModalViewControllerAnimated:YES];
Run Code Online (Sandbox Code Playgroud)

它工作正常...但是当我使用相同的方法([self deniedModalViewControllerAnimated:YES];)回家时,我必须按两次...而且当我再次按 - (IBAction)goto2:(id)sender从 goto2Controller 崩溃后发生..错误也是“不支持多次推送相同的视图控制器实例”有什么解决方案吗?我在我的 viewdidload 中有

 userdefNavController = [[UINavigationController alloc] initWithRootViewController:self];
Run Code Online (Sandbox Code Playgroud)

iphone

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

tar和gZ有什么区别?

当我在iphone SDK中压缩文件"file.tar.gZ"时,它给出了file.tar,但是tar和tar.gZ都给出了相同的大小吗?有什么帮助吗?

iphone

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

retain会在RAM中分配内存吗?

以下将在RAM中分配内存....

NSArray*obj = [[NSArray arrayWithObjects:@"Hai",@"​​iHow",
nil] retain];

iphone objective-c

0
推荐指数
2
解决办法
372
查看次数

tabBarController的didSelectViewController无法正常工作?

我已经在IB中实现了Tab栏控制器.但是当我在appdelegate.m中编写以下方法时,我没有调用它(我已经设置了断点)当我选择...?任何帮助?

- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController

- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item
Run Code Online (Sandbox Code Playgroud)

iphone

0
推荐指数
1
解决办法
4210
查看次数

(UIView*)hitTest问题?

我有一个Masterview.it有很多childviews.我使用下面的代码来检测触摸的视图,并带来前面相应的视图.代码工作正常.但是当我将子视图添加到子视图时,它没有工作,任何帮助请?

 - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event;
 {
self.hitView = nil;
self.hitView = [super  hitTest:point withEvent:event];
int x =  self.hitView.frame.origin.x;
int y =  self.hitView.frame.origin.y;
NSLog(@"x = %d",x);
NSLog(@"y = %d",y);
if ([self.viewDelegate respondsToSelector:
         @selector(view:hitTest:withEvent:hitView:)])
{
    return [self.viewDelegate view:self hitTest:point
                             withEvent:event hitView:hitView];
}
else
{

       [self bringSubviewToFront:self.hitView];
    return hitView;
}
Run Code Online (Sandbox Code Playgroud)

}

iphone uiviewcontroller uiview ipad

0
推荐指数
1
解决办法
7654
查看次数

coredata最好吗?

coredata比FMDB好吗?我们可以维护核心数据的主键吗?或者任何其他方法来实现而不是在核心数据中使用primarykey?请问任何教程?

iphone core-data ipad

0
推荐指数
1
解决办法
467
查看次数

什么是FFmpeg?

我正在使用LINK从视频中获取帧.但是它说要创建一个解码H264视频的商业项目,我们必须确保我们从MPEG LA获得许可.我们为什么要获得许可?一些教程说我们必须给LGPL提供完整的源代码,如果我们静态地集成FFMPEG.静态是什么意思?另一种选择是什么?我们可以将我们的应用程序提交到Appstore(用于在服务器中存储视频流)而无需获得LGPL的许可吗?我感到困惑?有什么帮助吗?

iphone ffmpeg iphone-sdk-3.0 ipad

0
推荐指数
1
解决办法
1680
查看次数

在iphone中有堆栈大小吗?

每个RAM必须有堆栈和堆(如CS,ES,DS,SS 4段).但是iphone中的堆栈大小是否只有堆可用?有些教程说当我们增加堆栈大小时,堆会减少,当我们增加堆大小,堆栈会减少......是真的吗?或固定堆栈大小或固定堆大小?有什么帮助吗?

iphone

-3
推荐指数
1
解决办法
2998
查看次数

tableview什么都没有?

我的tableview有numberOfRowsInSection returns 10以下方法.我已经完成了一切...... ......以下方法不会被调用....它没有显示......

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
Run Code Online (Sandbox Code Playgroud)

iphone uitableview

-4
推荐指数
1
解决办法
84
查看次数