문제

in my iOS project I use InAppSettings. This is missing a delegate in the modal view controller for willDismiss.

So when the modal view gets dismissed I want a method to be called in my main view controller. How can I do this? Is there a method in a view controller that gets triggered whe the view is in focus again?

도움이 되었습니까?

해결책

You could try something like this

BOOL settingsLaunched = NO;

-(void)presentInAppSettingsViewController
{
    //Show the settings modal view controller here

    //Set our flag
    settingsLaunched = YES;
}

-(void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];

    if(settingsLaunched)
    {
        //Your code here
    }
}

다른 팁

these will get called on the view after dismissing a modal dialog it presents

- (void) viewWillAppear
- (void) viewDidAppear:(BOOL)animated
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top