草庐IT

MX_Controller

全部标签

ios - 如何在 ios 的 subview Controller 中检测触摸事件

我为iPhone创建了一个类似侧View的菜单,为此我使用容器船概念在父ViewController中添加subviewController。当用户点击导航栏上的菜单按钮时,我只是更改subviewController的框架以使其像显示菜单一样动画,以便subviewController将其框架的一半剪裁到右侧。现在我的问题是,每当用户点击subviewController的任何部分时,我只想通知其父ViewController触摸事件已在其subviewController上触发,以便父ViewController可以重置subviewController的框架将其设置为动画,例如关

ios - 继续 : destination view controller weirdness

在我的应用程序中,我使用Storyboard和转场,我经常在转场之前将数据传递到目标ViewController,如下所示:-(void)prepareForSegue:(UIStoryboardSegue*)seguesender:(id)sender{if([segue.destinationViewControllerrespondsToSelector:@selector(setMyData:)]){[segue.destinationViewControllerperformSelector:@selector(setMyData:)withObject:myData];}}

ios - 测试是否在 View Controller 方法中调用了 performSegueWithIdentifier

我正在检查一个应用程序并添加单元测试。该应用程序使用Storyboard编写,支持iOS6.1及更高版本。我已经能够毫无问题地测试所有常用的返回方法。但是,我目前对要执行的某个测试感到困惑:本质上我有一个方法,我们称之为doLogin:-(IBAction)doLogin:(UIButton*)sender{//Somelogichereif(//certaincriteriatomeet){variable=x;//importantvariablesethere[selfperformSegueWithIdentifier:@"memorableWord"sender:sender

ios - 在刷完最后一个 View Controller 后,如何关闭/弹出 UIPageViewController?

在最后一个ViewController被滑动后,如何关闭/弹出UIPageViewController?基本上想制作一个带有图像的教程风格的分页View,并在用户从最后一页滑动到“下一页”后关闭。-(UIViewController*)pageViewController:(UIPageViewController*)pageViewControllerviewControllerAfterViewController:(UIViewController*)viewController{NSUIntegerindex=[(EmailTutorialViewController*)vie

ios - 将数据从一个 View Controller 传递到另一个; iOS <=4 对比 iOS 5

首先,介绍一下背景。我是iOS开发的新手,我已经在.Net领域工作了很长时间,这可能就是我问这个问题的原因,但现在就开始吧。基本设置是这样的。您有一个UINavigationController和一个我们称之为MasterViewController的RootViewController。当此MasterViewController上发生某些操作时,我们希望深入到DetailsViewController。但是,我们还想将一些数据传递给DetailsViewController。据我了解,在以前版本的SDK(iOS5之前)中,方法与此类似:@implementationMasterVi

ios - UINavigationBar -pushNavigationItem 在将新 Controller 推送到 UINavigationController 堆栈时从不调用

我今晚正在做一些测试,以查看nativeUINavigationBar的行为。我创建了一个执行以下操作的简单代码片段:-(void)pushController{PHViewController*ctrl2=[[[PHViewControlleralloc]initWithNibName:@"PHViewController"bundle:nil]autorelease];ctrl2.shouldShowPrompt=YES;[self.viewControllerpushViewController:ctrl2animated:YES];}-(BOOL)application:(UI

objective-c - 将另一个 View Controller 插入 UITabBarController View

对于我的应用程序中的导航,我使用的是UITabBarController。这工作正常,但在我的一个ViewController中,我想将另一个ViewController插入标签栏View。换句话说,我想用另一个替换选定的ViewController。我正在使用以下代码执行此操作:self.tabBarController.selectedViewController=self.otherViewController;我的TabBarController中的viewController列表不包含otherViewController。这个技巧在IOS4.3中工作正常,但IOS5不喜欢它

iphone - 隐藏底栏导航 Controller

我想在我的应用程序的某个屏幕上隐藏底部工具栏,并且IB似乎有一个选项似乎预览工作正常,但当我构建和测试应用程序时,底部工具栏仍然存在。我知道我可以使用[self.navigationControllersetToolbarHidden:YES];但我的问题不是如何使用代码来实现,而是如何通过InterfaceBuilder让它工作。这是我正在谈论的内容的屏幕截图。在右侧查看我如何选择BottomBar:None-这将删除左侧预览的底部栏。如果我将其设置为推断(而不是无),底部栏将显示在IB预览中。如何让它正常工作? 最佳答案 您不能

iOS UISearchController 崩溃 : Application tried to present modal view controller on itself

根据crashlytics,以下崩溃正在发生(很少)。Applicationtriedtopresentmodalviewcontrolleronitself.Presentingcontrolleris.我根本无法复制这个问题。这就是我设置UISearchController的方式。self.searchController=[[UISearchControlleralloc]initWithSearchResultsController:nil];self.searchController.dimsBackgroundDuringPresentation=NO;self.searc

【springboot项目运行报错】亲测有效 Parameter 0 of constructor in xxx.xxx.Controller required a bean o

更新项目以后,新增了许多java类,运行application来启动项目时报错:Parameter0ofconstructorinme.zhengjie.modules.system.rest.DictDetailControllerrequiredabeanoftype'me.zhengjie.modules.system.service.DictDetailService'thatcouldnotbefound.刚开始以为是文件DictDetailService不存在,结果不是,删除再导入后也解决不了问题。最终靠以下步骤解决:点击界面左侧的maven管理,再点击root下的生命周期,点击c