How to write the method to execute after completion of two methods (ios)

后端 未结 3 1110
说谎
说谎 2020-12-12 14:29

I have 2 methods to be executed on a button click event say method1: and method2: .Both have network calls and so cannot be sure which one will fin

3条回答
  •  悲&欢浪女
    2020-12-12 14:42

    Neat little method I got from Googles iOS Framework they rely on pretty heavily:

    - (void)runSigninThenInvokeSelector:(SEL)signInDoneSel {
    
    
        if (signInDoneSel) {
            [self performSelector:signInDoneSel];
        }
    
    }
    

提交回复
热议问题