Class myClass = NSClassFromString(@"DLWebAppManipulator");
SEL sel = NSSelectorFromString(@"goWebViewByUrlString:withNavigationController:");
if ([myClass respondsToSelector:sel]) {
[[myClass class] performSelector:sel withObject:urlStr withObject:self.navigationController];
}
动态调用不需要导入头文件。
动态调用的goWebViewByUrlString:withNavigationController方法有几个参数performSelector:sel withObject:urlStr withObject:self.navigationController就需要传几个参数