草庐IT

Delegate

全部标签

ios - 我可以在popViewcontroller 之后调用delegate 方法吗?

1)我有两个Controller,fistViewController,secondViewController。2)第一个Controller实现委托(delegate)说“xyzDelegate”。@interfaceFirstViewController:UIViewController3)FirstViewController中的delegate方法刷新UIViewTable。4)第一个Controller:推送第二个ViewController。SecondviewController*svc=[[SecondViewControlleralloc]initWithNibNa

ios - animationDidStop : finished: delegate method not getting called

我想在前一个动画例程完成后立即开始一个新的动画例程。然而,当前一个确实完成时,新的不会被触发,因为没有调用委托(delegate)方法。我已经委派了一个ViewController来处理按钮的CALayer的动画。“buttonSlide”是以前的动画,而“buttonFade”是新动画。这是代码片段:--(void)viewWillAppear:(BOOL)animated{NSLog(@"TimeViewappearing...");[superviewWillAppear:animated];[selfpressButton:nil];//Showscurrenttimeasso

ios - 为什么我的委托(delegate)变成零?

这个委托(delegate)模式我已经做过一百万次了。在第一百万次我得到一个零委托(delegate):CatViewController*vc=[[UIStoryboardstoryboardWithName:@"Cat"bundle:nil]instantiateInitialViewController];vc.delegate=self;[selfpresentViewController:vcanimated:YEScompletion:^{DDLogWarn(@"[%@%@]delegate:%@",THIS_FILE,THIS_METHOD,vc.delegate);//

ios - 带有模态表单的自定义委托(delegate)不起作用

我已经浏览了之前的大部分相关帖子,但尽管我已经正确地遵循了它们(据我所知),但我根本无法为下面的代码触发委托(delegate)方法。目的:ModalView生成字符串*SQL_String。按DONE关闭ModalView并触发父View中的委托(delegate)方法以获取*SQL_String。SearchModalViewController.h@protocolSearchControllerDelegate-(void)didDismissModalView:(NSString*)SQL_String;@end@interfaceSearchModalViewControl

ios - NSFetchedResultsControllerDelegate 委托(delegate)方法未被调用

这是我的代码:classFetchResultControllerDataProvider:NSObject,NSFetchedResultsControllerDelegate{privateletfetchedResultController:NSFetchedResultsControllerprivatevardelegate:TodayViewController!init(fetchedResultController:NSFetchedResultsController,delegate:TodayViewController){self.fetchedResultCon

iOS WKWebView.scrollView 委托(delegate)导致 BAD_ACCESS

我的viewController有一个包含WKWebView的UIView属性。我将WKWebViewscrollView委托(delegate)设置为我的viewController,这是我的UIView子类的公共(public)函数,并在我的viewController中调用。问题是当我调用[viewControllerpopViewControllerAnimated]时,它会在[UIScrollViewsetDelegate:]上崩溃。我通过在viewController的dealloc中添加viewController.UIView.WKWebView.scrollView.

ios 委托(delegate) Objective-c 数据从第二个 View Controller 发送到第一个 View Controller

我有2个ViewController。第一个是UIviewController,第二个是TableViewController。我想在选择第二个ViewController的行后将第二个数据(TableViewController)发送到第一个(uiviewController)。为此,我编写了一个委托(delegate)协议(protocol)。但是我的委托(delegate)协议(protocol)不起作用...我想出了问题。我正在创建的第二个ViewController的对象。address=[[second_viewcontrolleralloc]init];address.d

ios - 为什么 UICollectionViewFlowLayout 子类没有委托(delegate)属性?

Apple提供了UICollectionViewFlowLayout类,以及一个UICollectionViewDelegateFlowLayout协议(protocol),方法如下funccollectionView(collectionView:UICollectionView,layoutcollectionViewLayout:UICollectionViewLayout,minimumLineSpacingForSectionAtIndexsection:Int)->CGFloat和funccollectionView(collectionView:UICollectionV

ios - 更改 Storyboard后未调用 Tabbar 委托(delegate)方法

我在登录Storyboard中有登录和注册ViewController,而不是在主Storyboard中。一旦注册或登录成功,我就会将登录Storyboard更改为Main。以下代码有效,但是当我选择任何选项卡时,它不会调用AppDelegate中的选项卡委托(delegate)方法但是,如果用户已经成功注册或登录,则会调用以下标签栏委托(delegate)方法。LoginViewController.mif(isLoginSuccess){UIStoryboard*mainStoryboard=[UIStoryboardstoryboardWithName:@"Main"bundle

ios - Facebook iOS SDK - 自定义委托(delegate)

我正在开发一个与Facebook集成的新项目。该应用程序必须向facebook发出不同的请求。SDK提供一个委托(delegate)来处理每个相同的请求。现在我需要有一个自定义委托(delegate)来处理某些不同的请求。有人可以提示我如何完成此操作吗? 最佳答案 Facebook类公开了许多返回FBRequest*对象的方法,并且每个方法都有一个委托(delegate)参数,委托(delegate)可以是您喜欢的任何对象,只要它符合FBRequestDelegate协议(protocol)即可。因此,只要有一个自定义类即可为每种类