如果[UIApplication sharedApplication].delegate是appDelegate的话,那么他执行了login方法
正常情况下(系统默认)[UIApplication sharedApplication].delegate就是AppDelegate,当然你可以到main.m文件中修改他
正常情况下(系统默认)[UIApplication sharedApplication].delegate就是AppDelegate,当然你可以到main.m文件中修改他
所以在调用[UIApplication sharedApplication].delegate时表示了,要调用实现了UIApplicationDelegate协议的类。而我们知道,在App中,只有AppDelegate.h 类实现了UIApplicationDelegate 协议,那么你上面的代码
[([UIApplication sharedApplication].delegate) performSelector:@selector(login)];
则表示调用实现了UIApplicationDelegate协议的类的方法login